mirror of
https://github.com/ae-utbm/sith.git
synced 2024-12-23 16:21:22 +00:00
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
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/action@v3.0.1
|
|
with:
|
|
extra_args: --all-files
|
|
|
|
tests:
|
|
name: Run tests and generate coverage report
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false # don't interrupt the other test processes
|
|
matrix:
|
|
pytest-mark: [slow, not slow]
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v4
|
|
- uses: ./.github/actions/setup_project
|
|
- uses: ./.github/actions/setup_xapian
|
|
- uses: ./.github/actions/compile_messages
|
|
- name: Run tests
|
|
run: poetry run coverage run -m pytest -m "${{ matrix.pytest-mark }}"
|
|
- name: Generate coverage report
|
|
run: |
|
|
poetry run coverage report
|
|
poetry run coverage html
|
|
- name: Archive code coverage results
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: coverage-report
|
|
path: coverage_report
|