Skip to content

Commit 3ad27b6

Browse files
authored
Merge pull request #385 from GeospatialPython/vendor_pre_commit_action
Vendor pre-commit/action
2 parents 13d1fc0 + 4095cc4 commit 3ad27b6

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

.github/workflows/run_checks_build_and_test.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,35 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v6
16-
- uses: pre-commit/action@v3.0.1
16+
- uses: actions/setup-python@v6
17+
with:
18+
python-version: "3.14"
19+
20+
####################################################################
21+
# "this action is in maintenance-only mode and will not be accepting new features."
22+
# - uses: pre-commit/action@v3.0.1
23+
#
24+
# pre-commit/action does not intend to bump actions/cache from @v4:
25+
# https://github.com/pre-commit/action/issues/241
26+
# and has been stuck at @v3.0.1 for 2 years
27+
#
28+
# To bump actions/cache to v5 (to avoid the nuisance Node 20 deprecation
29+
# warning) the action is vendored below:
30+
#
31+
# Copyright (c) 2019 Anthony Sottile. MIT License.
32+
- run: python -m pip install pre-commit
33+
shell: bash
34+
- run: python -m pip freeze --local
35+
shell: bash
36+
- uses: actions/cache@v5
37+
with:
38+
path: ~/.cache/pre-commit
39+
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
40+
- run: pre-commit run --show-diff-on-failure --color=always ${{ inputs.extra_args }}
41+
shell: bash
42+
#
43+
#
44+
#####################################################################
1745

1846
mypy-strict:
1947
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)