Unit tests #937
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: Unit tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
schedule: | |
- cron: "0 4 * * *" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_number }} | |
cancel-in-progress: true | |
jobs: | |
unit-tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macos-latest | |
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox tox-gh-actions poetry coverage | |
- name: Run tests with tox | |
run: | | |
tox | |
coverage xml | |
- name: Upload to codecov.io | |
uses: codecov/codecov-action@v4 | |
with: | |
file: ./coverage.xml | |
flags: unittests |