From eb0f7c6b2bcfd3bc50c9183bea8b8adb80584b54 Mon Sep 17 00:00:00 2001 From: confarg <280620574+confarg@users.noreply.github.com> Date: Mon, 8 Jun 2026 22:35:23 +0200 Subject: [PATCH] ci: More thorough tests --- .github/workflows/ci-lint.yml | 2 +- .github/workflows/ci-test.yml | 22 ++++++++++++++++++++++ .github/workflows/ci-tests.yml | 15 --------------- .pre-commit-config.yaml | 13 ++++++++++--- 4 files changed, 33 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/ci-test.yml delete mode 100644 .github/workflows/ci-tests.yml diff --git a/.github/workflows/ci-lint.yml b/.github/workflows/ci-lint.yml index c526e4b..a4868ce 100644 --- a/.github/workflows/ci-lint.yml +++ b/.github/workflows/ci-lint.yml @@ -3,7 +3,7 @@ name: CI / Lint on: pull_request: branches: [master] - types: [opened, synchronize] + types: [opened, reopened, synchronize] jobs: lint: diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml new file mode 100644 index 0000000..c177daa --- /dev/null +++ b/.github/workflows/ci-test.yml @@ -0,0 +1,22 @@ +name: CI / Tests + +on: + pull_request: + branches: [master] + types: [opened, reopened, synchronize] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.12", "3.13", "3.14"] + resolution: ["locked", "latest"] + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v5 + - if: matrix.resolution == 'locked' + run: uv run --locked --python ${{ matrix.python-version }} pytest ./tests/ + - if: matrix.resolution == 'latest' + run: uv run --upgrade --python ${{ matrix.python-version }} pytest ./tests/ diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml deleted file mode 100644 index 163d378..0000000 --- a/.github/workflows/ci-tests.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: CI / Tests - -on: - pull_request: - branches: [master] - types: [opened, synchronize] - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v5 - - run: uv lock --check - - run: uv run pytest ./tests/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 58313df..bebb1c4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # v6.0.0 + rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # v6.0.0 hooks: - id: check-added-large-files args: [--maxkb=128] @@ -9,25 +9,32 @@ repos: - id: check-illegal-windows-names - id: check-json - id: check-merge-conflict + - id: check-symlinks - id: check-toml - id: check-yaml - id: debug-statements - id: detect-private-key - id: end-of-file-fixer - id: mixed-line-ending + args: [--fix=lf] - id: no-commit-to-branch args: [--branch, master] - id: trailing-whitespace args: [--markdown-linebreak-ext=md] - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks - rev: 4380fbb73a154b5f5624794c1c78d9719ccc860f # v2.16.0 + rev: 4380fbb73a154b5f5624794c1c78d9719ccc860f # v2.16.0 hooks: - id: pretty-format-yaml args: [--autofix, --indent, '2'] +- repo: https://github.com/astral-sh/uv-pre-commit + rev: c665864e22f27255a10d82e14f8ccea6843fd65e # 0.11.19 + hooks: + - id: uv-lock + - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 22f0422809455ec89ffdcf5a00170ba816e42ddb # v0.15.16 + rev: 22f0422809455ec89ffdcf5a00170ba816e42ddb # v0.15.16 hooks: - id: ruff-check args: [--fix]