Add caching for virtualenv #1347
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: Sith CI | |
on: | |
push: | |
branches: [master, taiste] | |
pull_request: | |
branches: [master, taiste] | |
workflow_dispatch: | |
jobs: | |
pre-commit: | |
name: Launch pre-commits checks (ruff) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
- uses: pre-commit/[email protected] | |
with: | |
extra_args: --all-files | |
setup: | |
name: Setup project for testing | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup_project | |
- name: Run tests | |
tests: | |
name: Run tests and generate coverage report | |
needs: setup | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false # don't interrupt the other test processes | |
matrix: | |
pytest-mark: [slow, not slow] | |
steps: | |
- name: Run tests | |
run: uv run coverage run -m pytest -m "${{ matrix.pytest-mark }}" | |
- name: Generate coverage report | |
run: | | |
uv run coverage report | |
uv run coverage html | |
- name: Archive code coverage results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage-report | |
path: coverage_report |