2024-09-23 08:25:27 +00:00
|
|
|
name: Sith CI
|
2023-05-02 09:00:23 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-09-19 20:17:26 +00:00
|
|
|
branches: [master, taiste]
|
2023-05-02 09:00:23 +00:00
|
|
|
pull_request:
|
2023-09-19 20:17:26 +00:00
|
|
|
branches: [master, taiste]
|
|
|
|
workflow_dispatch:
|
2023-05-02 09:00:23 +00:00
|
|
|
|
|
|
|
jobs:
|
2024-06-26 17:00:41 +00:00
|
|
|
pre-commit:
|
|
|
|
name: Launch pre-commits checks (ruff)
|
2023-05-02 09:00:23 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-06-26 17:00:41 +00:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
|
|
- uses: pre-commit/action@v3.0.1
|
|
|
|
with:
|
2024-07-02 18:16:02 +00:00
|
|
|
extra_args: --all-files
|
2023-05-02 09:00:23 +00:00
|
|
|
|
|
|
|
tests:
|
|
|
|
name: Run tests and generate coverage report
|
|
|
|
runs-on: ubuntu-latest
|
2024-07-04 12:39:32 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false # don't interrupt the other test processes
|
|
|
|
matrix:
|
|
|
|
pytest-mark: [slow, not slow]
|
2023-05-02 09:00:23 +00:00
|
|
|
steps:
|
|
|
|
- name: Check out repository
|
2024-06-26 17:10:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-05-02 09:00:23 +00:00
|
|
|
- uses: ./.github/actions/setup_project
|
|
|
|
- uses: ./.github/actions/setup_xapian
|
|
|
|
- uses: ./.github/actions/compile_messages
|
|
|
|
- name: Run tests
|
2024-07-04 12:39:32 +00:00
|
|
|
run: poetry run coverage run -m pytest -m "${{ matrix.pytest-mark }}"
|
2023-05-02 09:00:23 +00:00
|
|
|
- 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
|