-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TST] Continuous integration with GitHub Actions for v0.5 (#129)
* add GitHub action on push; skip tests that require ffmpeg skip ffmpeg doctests; fix flake8 * mark parfor test as expected fail * add codecov * drop Py2.7 * change pytest dir * fix codecov path * remove Travis remove Py3.8 from matrix add artifact upload pip install wheel add TestPyPI upload/verification add runs-on build on matrix.os build on matrix.os fix syntax error * fix Matplotlib issue on Mac OS X fix flake8 try to upgrade setuptools * try to fix Windows io.h issue try to fix Windows io.h issue try to fix Windows io.h issue try to fix Windows io.h issue try to fix Windows io.h issue try to fix Windows io.h issue try to fix Windows io.h issue try to fix Windows io.h issue try to fix Windows io.h issue try to fix Windows io.h issue try to fix Windows io.h issue try to fix Windows io.h issue try to fix Windows io.h issue try to fix Windows io.h issue try to fix Windows io.h issue fix Windows env fix Windows env fix Windows env add includes ucrt, um, shared add LIB, PATH add LIB, PATH add LIB, PATH install matplotlib on Win debug win workflow debug win workflow debug win workflow debug win workflow * add Ubuntu 16.04, remove wheel building * add supported platforms to README; document the workflow file * fix checkout version
- Loading branch information
Showing
8 changed files
with
94 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Run CI checks | ||
|
||
on: [push, pull_request] | ||
|
||
# By default, jobs run in parallel on a fresh instance of the virtual | ||
# environment. You can force sequential order by specifying a job's | ||
# dependencies with the "needs" attribute. | ||
jobs: | ||
|
||
# Continuous integration: Run unit tests on all supported platforms whenever | ||
# someone pushes a new commit or creates a pull request. | ||
build: | ||
name: Building on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
max-parallel: 4 | ||
# Test on all supported platforms using all supported Python versions: | ||
matrix: | ||
python-version: [3.5, 3.6, 3.7] | ||
os: [ubuntu-latest, ubuntu-16.04, windows-latest, macOS-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip wheel setuptools | ||
# For Windows: | ||
pip install matplotlib | ||
# Install p2p requirements: | ||
pip install -r requirements.txt | ||
- name: Lint with flake8 | ||
run: | | ||
pip install flake8 | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 pulse2percept --ignore N802,N806,W503 --select W504 --count --show-source --statistics | ||
- name: Install package (Windows) | ||
# https://github.com/pandas-dev/pandas/issues/981 | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
$env:INCLUDE = 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt' | ||
$env:INCLUDE += ';C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\shared' | ||
$env:INCLUDE += ';C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um' | ||
$env:LIB = 'C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\ucrt\x64' | ||
$env:LIB += ';C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\um\x64' | ||
$env:PATH += ';C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64' | ||
pip install -e . | ||
- name: Install package (Unix) | ||
if: matrix.os != 'windows-latest' | ||
run: | | ||
pip install -e . | ||
- name: Run test suite with pytest | ||
run: | | ||
pip install pytest mock pytest-cov | ||
mkdir test_dir | ||
cd test_dir | ||
pytest --pyargs pulse2percept --cov-report=xml --cov=pulse2percept --doctest-modules | ||
- name: Upload coveragei report to codecov.io | ||
uses: codecov/codecov-action@v1 | ||
# Cannot yet post coverage report as comments on the PR, but see: | ||
# https://github.com/codecov/codecov-python/pull/214 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./test_dir/coverage.xml | ||
flags: unittests | ||
name: codecov-umbrella | ||
yml: ./codecov.yml |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters