[ENH][REF] Cortex #16
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
name: build_slow | |
on: [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 creates a pull request. | |
build: | |
name: Building on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
os: [ubuntu-latest, windows-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 | |
# Install p2p requirements: | |
pip install -r requirements.txt | |
pip install -r requirements-dev.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,W504 --select W503 --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: Log environment info | |
run: | | |
python --version | |
pip freeze | |
gcc --version | |
- name: Run test suite with pytest (slow) | |
run: | | |
pip install neuropythy | |
mkdir test_dir | |
cd test_dir | |
pytest --runslow --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 |