ci: separate lint and test workflows
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
name: Python CI
|
||||
name: Python Lint CI
|
||||
|
||||
concurrency:
|
||||
group: python-${{ github.ref }}
|
||||
group: lint-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/python.yml'
|
||||
- '.github/workflows/lint.yml'
|
||||
- 'pyproject.toml'
|
||||
- 'uv.lock'
|
||||
- '.python-version'
|
||||
@@ -44,19 +44,3 @@ jobs:
|
||||
uses: actions/setup-uv@v1
|
||||
- name: Run ty check
|
||||
run: uv run ty check --output-format=github
|
||||
|
||||
coverage:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
- name: Set up UV
|
||||
uses: actions/setup-uv@v1
|
||||
- name: Run tests with coverage
|
||||
run: uv run coverage run -m unittest -v
|
||||
- name: Generate coverage XML report
|
||||
run: uv run coverage xml
|
||||
- name: Create coverage summary
|
||||
uses: actions/code-coverage-summary@v1.3.0
|
||||
with:
|
||||
filename: coverage.xml
|
||||
@@ -0,0 +1,32 @@
|
||||
name: Python Test CI
|
||||
|
||||
concurrency:
|
||||
group: test-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/test.yml'
|
||||
- 'pyproject.toml'
|
||||
- 'uv.lock'
|
||||
- '.python-version'
|
||||
- '**/*.py'
|
||||
|
||||
jobs:
|
||||
coverage:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
- name: Set up UV
|
||||
uses: actions/setup-uv@v1
|
||||
- name: Run tests with coverage
|
||||
run: uv run coverage run -m unittest -v
|
||||
- name: Generate coverage XML report
|
||||
run: uv run coverage xml
|
||||
- name: Create coverage summary
|
||||
uses: actions/code-coverage-summary@v1.3.0
|
||||
with:
|
||||
filename: coverage.xml
|
||||
@@ -1,4 +1,4 @@
|
||||
[](https://git.klemek.fr/klemek/stapler/actions?workflow=python.yml) [](https://git.klemek.fr/klemek/stapler/actions?workflow=docker.yml)
|
||||
[](https://git.klemek.fr/klemek/stapler/actions?workflow=lint.yml) [](https://git.klemek.fr/klemek/stapler/actions?workflow=test.yml) [](https://git.klemek.fr/klemek/stapler/actions?workflow=docker.yml)
|
||||
|
||||
# Stapler <!-- omit in toc -->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user