Skip to content

Merge pull request #887 from PMEAL/micromodel_generator #413

Merge pull request #887 from PMEAL/micromodel_generator

Merge pull request #887 from PMEAL/micromodel_generator #413

Workflow file for this run

name: Tests
on:
push:
pull_request:
branches:
- release
jobs:
build:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
max-parallel: 9
matrix:
# Add '3.10' to the list once #611 is addressed
python-version: ['3.8', '3.9', '3.10']
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
path: ~/.cache/pip
- os: macos-latest
path: ~/Library/Caches/pip
- os: windows-latest
path: ~\AppData\Local\pip\Cache
steps:
- name: Cache pip
uses: actions/cache@v2
with:
path: ${{ matrix.path }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- 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 (pip)
run: |
pip install \
-r requirements.txt \
-r requirements/tests.txt
# TODO: uncomment this step when integration tests are fixed
# - name: Disable numba JIT for codecov to include jitted methods
# if: (matrix.python-version == 3.8) && (matrix.os == 'ubuntu-latest')
# run: |
# echo "NUMBA_DISABLE_JIT=1" >> $GITHUB_ENV
- name: Running tests
run:
pytest .
--cov=.
--cov-report=xml
--pycodestyle
- name: Upload coverage to Codecov
if: (matrix.python-version == 3.8) && (matrix.os == 'ubuntu-latest')
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
name: codecov-umbrella