48 lines
1.3 KiB
YAML
Raw Normal View History

2024-09-23 10:25:27 +02:00
name: Sith CI
2023-05-02 11:00:23 +02:00
on:
push:
2023-09-19 22:17:26 +02:00
branches: [master, taiste]
2023-05-02 11:00:23 +02:00
pull_request:
2023-09-19 22:17:26 +02:00
branches: [master, taiste]
workflow_dispatch:
2023-05-02 11:00:23 +02:00
jobs:
pre-commit:
name: Launch pre-commits checks (ruff)
2023-05-02 11:00:23 +02:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
2025-01-06 16:17:36 +01:00
with:
python-version-file: ".python-version"
- uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files
2023-05-02 11:00:23 +02:00
tests:
name: Run tests and generate coverage report
runs-on: ubuntu-latest
2024-07-04 14:39:32 +02:00
strategy:
fail-fast: false # don't interrupt the other test processes
matrix:
pytest-mark: [slow, not slow]
2023-05-02 11:00:23 +02:00
steps:
- name: Check out repository
uses: actions/checkout@v4
2023-05-02 11:00:23 +02:00
- uses: ./.github/actions/setup_project
2025-01-06 15:10:00 +01:00
env:
# To avoid race conditions on environment cache
CACHE_SUFFIX: ${{ matrix.pytest-mark }}
2023-05-02 11:00:23 +02:00
- name: Run tests
2025-01-06 16:17:54 +01:00
run: uv run coverage run -m pytest -m "${{ matrix.pytest-mark }}"
2023-05-02 11:00:23 +02:00
- name: Generate coverage report
run: |
2025-01-06 16:17:54 +01:00
uv run coverage report
uv run coverage html
2023-05-02 11:00:23 +02:00
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: coverage_report