.github/workflows/unittest.yml
name: Unit testing
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8]
matplotlib: [noplot, plot]
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
# Install FFTW 3 library with Ubuntu package manager
sudo apt install libfftw3-dev
# Update pip to latest version
python -m pip install --upgrade pip
# Set optional features
OPTIONS=""
if test "${{ matrix.matplotlib }}" == "plot"; then
OPTIONS="${OPTIONS}, plot"
fi
# Install chebpy with test and other optional features
pip install ".[test${OPTIONS}]"
- name: Run tests
run: |
nosetests -v --where=tests/ --with-coverage --cover-package=chebpy
coverage-lcov --data_file_path .coverage --output_file_path lcov.info
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov.info
flag-name: run-py${{ matrix.python-version }}-${{ matrix.matplotlib }}
parallel: true
finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true