ci: fix and document CI
This commit is contained in:
@@ -1,38 +1,58 @@
|
||||
name: Python CI
|
||||
on: [ push ]
|
||||
|
||||
concurrency:
|
||||
group: python-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on: [push, workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
ruff:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: astral-sh/ruff-action@v3
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
- name: Run Ruff check
|
||||
uses: https://github.com/astral-sh/ruff-action@v3
|
||||
with:
|
||||
args: "check"
|
||||
|
||||
ruff-format-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: astral-sh/ruff-action@v3
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
- name: Run Ruff format check
|
||||
uses: https://github.com/astral-sh/ruff-action@v3
|
||||
with:
|
||||
args: "format --check --diff"
|
||||
|
||||
ty:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: python3 -m pip install uv --break-system-packages
|
||||
- uses: actions/checkout@v5
|
||||
- run: python3 -m uv sync
|
||||
- run: python3 -m uv run ty check --output-format github
|
||||
- name: Install UV
|
||||
run: python3 -m pip install uv --break-system-packages
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
- name: Sync Python dependencies
|
||||
run: python3 -m uv sync
|
||||
- name: Run ty check
|
||||
run: python3 -m uv run ty check --output-format github
|
||||
|
||||
coverage:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: python3 -m pip install uv --break-system-packages
|
||||
- uses: actions/checkout@v5
|
||||
- run: python3 -m uv sync
|
||||
- run: python3 -m uv run coverage run -m unittest -v
|
||||
- run: python3 -m uv run coverage xml
|
||||
- uses: irongut/CodeCoverageSummary@v1.3.0
|
||||
- name: Install UV
|
||||
run: python3 -m pip install uv --break-system-packages
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
- name: Sync Python dependencies
|
||||
run: python3 -m uv sync
|
||||
- name: Run tests with coverage
|
||||
run: python3 -m uv run coverage run -m unittest -v
|
||||
- name: Generate coverage XML report
|
||||
run: python3 -m uv run coverage xml
|
||||
- name: Create coverage summary
|
||||
uses: https://github.com/irongut/CodeCoverageSummary@v1.3.0
|
||||
with:
|
||||
filename: coverage.xml
|
||||
|
||||
Reference in New Issue
Block a user