From 413ec4d9fab4ab95a44d70881db993e6bdb3558e Mon Sep 17 00:00:00 2001 From: Ben Jeffery Date: Tue, 9 Sep 2025 10:40:01 +0100 Subject: [PATCH 1/2] Use reusable lint workflow --- .github/workflows/tests.yml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8ddf911..e5e7edf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,23 +3,13 @@ name: Tests on: pull_request: push: - branches: [main] + branches: [main, test] merge_group: jobs: pre-commit: name: Lint - runs-on: ubuntu-24.04 - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.12.1 - with: - access_token: ${{ github.token }} - - uses: actions/checkout@v4.2.2 - - uses: actions/setup-python@v5.3.0 - with: - python-version: '3.12' - - uses: pre-commit/action@v3.0.1 + uses: tskit-dev/.github/.github/workflows/lint.yml@v1 test: name: Python From 85ae5270691d961fe0708c206b67f6ea11966c13 Mon Sep 17 00:00:00 2001 From: Ben Jeffery Date: Tue, 9 Sep 2025 12:46:22 +0100 Subject: [PATCH 2/2] Update pre-commit hooks --- .github/workflows/tests.yml | 2 +- .pre-commit-config.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e5e7edf..d631d7d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,7 @@ on: jobs: pre-commit: name: Lint - uses: tskit-dev/.github/.github/workflows/lint.yml@v1 + uses: tskit-dev/.github/.github/workflows/lint.yml@v2 test: name: Python diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bef0263..4933e12 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ # pre-commit run --all-files repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-merge-conflict - id: debug-statements @@ -9,13 +9,13 @@ repos: - id: check-case-conflict - id: check-yaml - repo: https://github.com/asottile/reorder_python_imports - rev: v3.14.0 + rev: v3.15.0 hooks: - id: reorder-python-imports args: [--application-directories=python, ] - repo: https://github.com/asottile/pyupgrade - rev: v3.19.1 + rev: v3.20.0 hooks: - id: pyupgrade args: [--py3-plus, --py37-plus] @@ -25,13 +25,13 @@ repos: - id: black language_version: python3 - repo: https://github.com/pycqa/flake8 - rev: 7.1.2 + rev: 7.3.0 hooks: - id: flake8 args: [--config=.flake8] additional_dependencies: ["flake8-bugbear==22.10.27", "flake8-builtins==2.0.1"] - repo: https://github.com/adamchainz/blacken-docs - rev: 1.19.1 + rev: 1.20.0 hooks: - id: blacken-docs args: [--skip-errors]