Skip to content

tests

tests #403

Workflow file for this run

name: tests
on:
pull_request:
workflow_call:
inputs:
job:
required: true
type: string
schedule:
- cron: "0 12 * * 1" # monday at noon GMT
jobs:
build:
name: ${{ matrix.platform }}
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
python-version: ${{ fromJSON(vars.PYTHON_VERSIONS) }}
platform:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Test with pytest
run: |
pip install '.[tests]'
pytest test/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true