Merge pull request #1015 from TheDeanLab/1005-v2 #2765
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
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Tests | |
on: | |
push: | |
branches: | |
- develop | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
python-version: ["3.9"] | |
operating-system: [windows-latest] # [ubuntu-latest, windows-latest] | |
env: | |
MPLBACKEND: Agg # https://github.com/microsoft/azure-pipelines-tasks/issues/16426 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e '.[dev]' | |
- name: Test with pytest | |
run: | | |
python3 -m pytest -m "not hardware" --cov=./ --cov-report=xml | |
- name: Codecov | |
uses: codecov/codecov-action@v3.1.0 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
directory: ./coverage/reports/ | |
env_vars: OS,PYTHON | |
fail_ci_if_error: false | |
files: ./coverage.xml | |
flags: unittests | |
name: codecov-umbrella | |
verbose: true |