[chore
] Add some additional commands to the Makefile
#854
Workflow file for this run
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 | |
- v*-release | |
pull_request: | |
branches: | |
- master | |
- v*-release | |
workflow_dispatch: | |
jobs: | |
test_sampling: | |
name: Run unit tests | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | |
os: [ubuntu-latest, windows-latest] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Python environment | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Try to load cached dependencies | |
uses: actions/cache@v3 | |
id: restore-cache | |
with: | |
path: ${{ env.pythonLocation }} | |
key: python-dependencies-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ env.pythonLocation }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install '.[dev,train]' | |
- name: Run unit tests | |
run: | | |
python -m pytest --durations 20 -sv tests/ |