Skip to content

Commit 95d642e

Browse files
authored
replace pre-commit with prek (#493)
1 parent e7a1cbd commit 95d642e

File tree

5 files changed

+16
-17
lines changed

5 files changed

+16
-17
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ on:
1010
permissions:
1111
contents: read
1212

13-
env:
14-
MIN_PYTHON_VERSION: "3.10"
15-
1613
jobs:
1714
test:
1815
runs-on: ubuntu-latest
@@ -22,7 +19,7 @@ jobs:
2219
- name: Setup Python
2320
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
2421
with:
25-
python-version: ${{ env.MIN_PYTHON_VERSION }}
22+
python-version-file: '.python-version'
2623

2724
- name: Install dependencies
2825
run: |
@@ -45,7 +42,7 @@ jobs:
4542
- name: Set up Python
4643
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
4744
with:
48-
python-version: ${{ env.MIN_PYTHON_VERSION }}
45+
python-version-file: '.python-version'
4946

5047
- name: Install dependencies
5148
run: |
@@ -74,7 +71,7 @@ jobs:
7471
- name: Set up Python
7572
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
7673
with:
77-
python-version: ${{ env.MIN_PYTHON_VERSION }}
74+
python-version-file: '.python-version'
7875
- name: publish brew
7976
run: |
8077
sleep 5m

.github/workflows/test.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,22 @@ permissions:
1212
contents: read
1313

1414
env:
15-
MIN_PYTHON_VERSION: "3.10"
15+
PREK_VERSION: '0.2.11'
1616

1717
jobs:
18-
pre-commit:
18+
prek:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2222
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
2323
with:
24-
python-version: ${{ env.MIN_PYTHON_VERSION }}
25-
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
24+
python-version-file: '.python-version'
25+
- uses: j178/prek-action@91fd7d7cf70ae1dee9f4f44e7dfa5d1073fe6623 # v1.0.11
26+
with:
27+
prek-version: ${{ env.PREK_VERSION }}
2628

2729
ci:
28-
needs: pre-commit
30+
needs: prek
2931
runs-on: ubuntu-latest
3032
timeout-minutes: 15
3133
steps:
@@ -34,7 +36,7 @@ jobs:
3436
- name: Setup Python
3537
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
3638
with:
37-
python-version: ${{ env.MIN_PYTHON_VERSION }}
39+
python-version-file: '.python-version'
3840

3941
- name: Install dependencies
4042
run: |
@@ -53,7 +55,7 @@ jobs:
5355
make type-check
5456
5557
python-version:
56-
needs: pre-commit
58+
needs: prek
5759
if: github.event_name == 'pull_request'
5860
runs-on: ubuntu-latest
5961
timeout-minutes: 15

.github/workflows/update-bundle-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Setup python
2222
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
2323
with:
24-
python-version: ${{ env.MIN_PYTHON_VERSION }}
24+
python-version-file: '.python-version'
2525

2626
- name: Install dependencies
2727
run: |

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
repos:
22
- repo: https://github.com/rhysd/actionlint
3-
rev: v1.7.7
3+
rev: v1.7.8
44
hooks:
55
- id: actionlint-docker
66
- repo: https://github.com/astral-sh/ruff-pre-commit
7-
rev: v0.14.0
7+
rev: v0.14.2
88
hooks:
99
- id: ruff-check
1010
files: ^(cloudsplaining/|setup.py)

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-r requirements.txt
22
# CI
3-
pre-commit==4.3.0
3+
prek==0.2.11
44
# Unit testing
55
pytest==8.4.2
66
coverage==7.10.7

0 commit comments

Comments
 (0)