From af427eda653b8bf8b4b2bc1ab73ad5489c02c367 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 19 Mar 2026 10:56:26 -0400 Subject: [PATCH 1/3] ci: more speed Signed-off-by: Henry Schreiner --- .gitignore | 21 +++++++++++++-- .../.github/workflows/ci.yml | 27 +++++++++++++++---- {{cookiecutter.project_name}}/.gitignore | 6 ++--- 3 files changed, 43 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index d44bf565..279972d0 100644 --- a/.gitignore +++ b/.gitignore @@ -48,7 +48,6 @@ coverage.xml *.cover *.py,cover .hypothesis/ -.pytest_cache/ cover/ # Translations @@ -124,7 +123,6 @@ venv.bak/ /site # mypy -.mypy_cache/ .dmypy.json dmypy.json @@ -165,3 +163,22 @@ _readthedocs # Jekyll build artifacts vendor/ .bundle/ + +# General +.DS_Store + +# Caches +.*_cache/ + +# OS specific stuff +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# Common editor files +*~ +*.swp diff --git a/{{cookiecutter.project_name}}/.github/workflows/ci.yml b/{{cookiecutter.project_name}}/.github/workflows/ci.yml index 6af04278..7bebf60d 100644 --- a/{{cookiecutter.project_name}}/.github/workflows/ci.yml +++ b/{{cookiecutter.project_name}}/.github/workflows/ci.yml @@ -18,29 +18,33 @@ env: FORCE_COLOR: 3 jobs: - pre-commit: + lint: name: Format runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 + {%- if cookiecutter.vcs %} with: fetch-depth: 0 + {%- endif %} + - uses: actions/setup-python@v6 with: python-version: "3.x" - uses: astral-sh/setup-uv@v7 - - uses: pre-commit/action@v3.0.1 - with: - extra_args: --hook-stage manual --all-files + - uses: j178/prek-action@v2 + - name: Run Pylint run: uvx nox -s pylint -- --output-format=github checks: name: {% raw %}Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}{% endraw %} runs-on: {% raw %}${{ matrix.runs-on }}{% endraw %} - needs: [pre-commit] + {%- if cookiecutter._compiled %} + needs: [lint] + {%- endif %} strategy: fail-fast: false matrix: @@ -53,8 +57,10 @@ jobs: steps: - uses: actions/checkout@v6 + {%- if cookiecutter.vcs %} with: fetch-depth: 0 + {%- endif %} - uses: actions/setup-python@v6 with: @@ -83,3 +89,14 @@ jobs: uses: codecov/codecov-action@v5 with: token: {% raw %}${{ secrets.CODECOV_TOKEN }}{% endraw %} + + pass: + if: always() + needs: [lint, checks] + runs-on: ubuntu-slim + timeout-minutes: 2 + steps: + - name: Decide whether the needed jobs succeeded or failed + uses: re-actors/alls-green@release/v1 + with: + jobs: ${{ toJSON(needs) }} diff --git a/{{cookiecutter.project_name}}/.gitignore b/{{cookiecutter.project_name}}/.gitignore index ab80d43c..a0eee367 100644 --- a/{{cookiecutter.project_name}}/.gitignore +++ b/{{cookiecutter.project_name}}/.gitignore @@ -48,7 +48,6 @@ coverage.xml *.cover *.py,cover .hypothesis/ -.pytest_cache/ cover/ # Translations @@ -147,7 +146,6 @@ venv.bak/ /site # mypy -.mypy_cache/ .dmypy.json dmypy.json @@ -171,8 +169,8 @@ cython_debug/ src/*/_version.py -# ruff -.ruff_cache/ +# Caches +.*_cache/ # OS specific stuff .DS_Store From 5cfa955deda1ef0c2ace051e2cdd67d816ebeba0 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 19 Mar 2026 11:05:28 -0400 Subject: [PATCH 2/3] Apply suggestion from @henryiii --- {{cookiecutter.project_name}}/.github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_name}}/.github/workflows/ci.yml b/{{cookiecutter.project_name}}/.github/workflows/ci.yml index 7bebf60d..ada9cb63 100644 --- a/{{cookiecutter.project_name}}/.github/workflows/ci.yml +++ b/{{cookiecutter.project_name}}/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: checks: name: {% raw %}Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}{% endraw %} runs-on: {% raw %}${{ matrix.runs-on }}{% endraw %} - {%- if cookiecutter._compiled %} + {%- if cookiecutter.__type == "compiled" %} needs: [lint] {%- endif %} strategy: From c9ca2ad334c6ed05bc64eef453dea609107148ff Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 19 Mar 2026 11:08:50 -0400 Subject: [PATCH 3/3] Apply suggestion from @henryiii --- {{cookiecutter.project_name}}/.github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_name}}/.github/workflows/ci.yml b/{{cookiecutter.project_name}}/.github/workflows/ci.yml index ada9cb63..ed9e0749 100644 --- a/{{cookiecutter.project_name}}/.github/workflows/ci.yml +++ b/{{cookiecutter.project_name}}/.github/workflows/ci.yml @@ -99,4 +99,4 @@ jobs: - name: Decide whether the needed jobs succeeded or failed uses: re-actors/alls-green@release/v1 with: - jobs: ${{ toJSON(needs) }} + jobs: {% raw %}${{ toJSON(needs) }}{% endraw %}