mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-29 20:44:24 +00:00
d97602e60b
* use pytest for tests Eh ouais, il y a que la config qui change. Pytest est implémentable par étapes. Et ça c'est beau. * rework tests with pytest * remove unittest custom TestRunner * Edit doc and CI
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: Sith 3 CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master, taiste]
|
|
pull_request:
|
|
branches: [master, taiste]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
ruff:
|
|
name: Ruff lint & format
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: ruff format
|
|
uses: chartboost/ruff-action@v1 # format
|
|
with:
|
|
args: format --diff
|
|
- name: ruff check
|
|
uses: chartboost/ruff-action@v1 # lint
|
|
|
|
tests:
|
|
name: Run tests and generate coverage report
|
|
runs-on: ubuntu-latest
|
|
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
|
|
- 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
|