From 458104026f9f7bbb24a34dcb4f45ed54f5101f35 Mon Sep 17 00:00:00 2001 From: klemek Date: Sun, 3 May 2026 18:42:52 +0200 Subject: [PATCH] ci: separate lint and test workflows --- .github/workflows/{python.yml => lint.yml} | 22 ++------------- .github/workflows/test.yml | 32 ++++++++++++++++++++++ README.md | 2 +- 3 files changed, 36 insertions(+), 20 deletions(-) rename .github/workflows/{python.yml => lint.yml} (63%) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/python.yml b/.github/workflows/lint.yml similarity index 63% rename from .github/workflows/python.yml rename to .github/workflows/lint.yml index d1c7406..d80cb5f 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/lint.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..fc53912 --- /dev/null +++ b/.github/workflows/test.yml @@ -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 diff --git a/README.md b/README.md index 67021f9..077f24d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![](https://git.klemek.fr/klemek/stapler/actions/workflows/python.yml/badge.svg?branch=main&style=flat-square)](https://git.klemek.fr/klemek/stapler/actions?workflow=python.yml) [![](https://git.klemek.fr/klemek/stapler/actions/workflows/docker.yml/badge.svg?branch=main&style=flat-square)](https://git.klemek.fr/klemek/stapler/actions?workflow=docker.yml) +[![](https://git.klemek.fr/klemek/stapler/actions/workflows/lint.yml/badge.svg?branch=main&style=flat-square)](https://git.klemek.fr/klemek/stapler/actions?workflow=lint.yml) [![](https://git.klemek.fr/klemek/stapler/actions/workflows/test.yml/badge.svg?branch=main&style=flat-square)](https://git.klemek.fr/klemek/stapler/actions?workflow=test.yml) [![](https://git.klemek.fr/klemek/stapler/actions/workflows/docker.yml/badge.svg?branch=main&style=flat-square)](https://git.klemek.fr/klemek/stapler/actions?workflow=docker.yml) # Stapler