Refactor Github actions to run on all OS, Python and RF versions #1975
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
--- | |
# This workflow will install Python dependencies | |
# and run unit tests for given OSes | |
name: Unit tests | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: | | |
3.8 | |
3.9 | |
3.10 | |
3.11 | |
3.12 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install nox | |
- name: Run unit tests with coverage | |
run: | |
nox -s coverage | |
- name: Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
name: ${{ matrix.os }} |