Sith/.github/workflows/ci.yml

43 lines
1.1 KiB
YAML
Raw Normal View History

2023-05-02 09:00:23 +00:00
name: Sith 3 CI
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:
ruff:
name: Ruff lint & format
2023-05-02 09:00:23 +00:00
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
2023-05-02 09:00:23 +00:00
tests:
name: Run tests and generate coverage report
runs-on: ubuntu-latest
steps:
- name: Check out repository
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
run: poetry run coverage run -m pytest
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