Skip to content

Commit 1ab561b

Browse files
committed
🔒 restrict dependencies (pypi) via strict hashes
1 parent d4767ab commit 1ab561b

File tree

5 files changed

+277
-26
lines changed

5 files changed

+277
-26
lines changed

.github/workflows/cd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ jobs:
2828
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
2929
with:
3030
python-version: '3'
31-
- name: Update pip, install build
31+
- name: Install CI Requirements
3232
run: |
33-
python -m pip install build
33+
python -m pip install -r ci-requirements.txt --require-hashes
3434
- name: Build Wheel
3535
env:
3636
CHARSET_NORMALIZER_USE_MYPYC: '0'

.github/workflows/ci.yml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ jobs:
2222
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
2323
with:
2424
python-version: '3'
25-
- name: Install nox
26-
run: python -m pip install nox
25+
- name: Install CI Requirements
26+
run: |
27+
python -m pip install -r ci-requirements.txt --require-hashes
2728
- name: Pre-commit checks
2829
run: nox -s lint
2930

@@ -53,8 +54,9 @@ jobs:
5354
with:
5455
python-version: ${{ matrix.python-version }}
5556
allow-prereleases: true
56-
- name: Install dependencies
57-
run: python -m pip install nox
57+
- name: Install CI Requirements
58+
run: |
59+
python -m pip install -r ci-requirements.txt --require-hashes
5860
- name: Run tests
5961
run: nox -s test-${{ matrix.python-version }}
6062
- name: "Upload artifact"
@@ -81,8 +83,9 @@ jobs:
8183
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
8284
with:
8385
python-version: '3'
84-
- name: Install dependencies
85-
run: python -m pip install nox
86+
- name: Install CI Requirements
87+
run: |
88+
python -m pip install -r ci-requirements.txt --require-hashes
8689
- name: Coverage WITH preemptive
8790
run: nox -s coverage -- --coverage 97 --with-preemptive
8891
- name: Coverage WITHOUT preemptive
@@ -118,8 +121,9 @@ jobs:
118121
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
119122
with:
120123
python-version: '3'
121-
- name: Install dependencies
122-
run: pip install nox
124+
- name: Install CI Requirements
125+
run: |
126+
python -m pip install -r ci-requirements.txt --require-hashes
123127
- name: Integration Tests with Requests
124128
run: nox -s downstream_${{ matrix.downstream_project }}
125129

@@ -136,8 +140,9 @@ jobs:
136140
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
137141
with:
138142
python-version: '3'
139-
- name: Install dependencies
140-
run: pip install nox
143+
- name: Install CI Requirements
144+
run: |
145+
python -m pip install -r ci-requirements.txt --require-hashes
141146
- name: BC Coverage
142147
run: nox -s backward_compatibility -- --coverage 80
143148

@@ -180,8 +185,9 @@ jobs:
180185
with:
181186
python-version: ${{ matrix.python-version }}
182187
allow-prereleases: true
183-
- name: Install nox
184-
run: pip install nox
188+
- name: Install CI Requirements
189+
run: |
190+
python -m pip install -r ci-requirements.txt --require-hashes
185191
- name: Run tests with mypyc enabled
186192
run: nox -s test_mypyc-${{ matrix.python-version }}
187193
- name: "Upload artifact"
@@ -208,8 +214,9 @@ jobs:
208214
with:
209215
python-version: "3.x"
210216

211-
- name: "Install coverage"
212-
run: "python -m pip install --upgrade coverage"
217+
- name: Install CI Requirements
218+
run: |
219+
python -m pip install -r ci-requirements.txt --require-hashes
213220
214221
- name: "Download artifact"
215222
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
@@ -243,7 +250,8 @@ jobs:
243250
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
244251
with:
245252
python-version: '3'
246-
- name: Install dependencies
247-
run: pip install nox
253+
- name: Install CI Requirements
254+
run: |
255+
python -m pip install -r ci-requirements.txt --require-hashes
248256
- name: Performance Measurement
249257
run: nox -s performance

ci-requirements.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
nox==2024.4.15; python_version == '3.7'
2+
--hash=sha256:6492236efa15a460ecb98e7b67562a28b70da006ab0be164e8821177577c0565
3+
--hash=sha256:ecf6700199cdfa9e5ea0a41ff5e6ef4641d09508eda6edb89d9987864115817f
4+
nox==2025.5.1; python_version >= '3.8'
5+
--hash=sha256:56abd55cf37ff523c254fcec4d152ed51e5fe80e2ab8317221d8b828ac970a31
6+
--hash=sha256:2a571dfa7a58acc726521ac3cd8184455ebcdcbf26401c7b737b5bc6701427b2
7+
build==1.1.1; python_version == '3.7'
8+
--hash=sha256:8ed0851ee76e6e38adce47e4bee3b51c771d86c64cf578d0c2245567ee200e73
9+
--hash=sha256:8eea65bb45b1aac2e734ba2cc8dad3a6d97d97901a395bd0ed3e7b46953d2a31
10+
build==1.2.2.post1; python_version == '3.8'
11+
--hash=sha256:1d61c0887fa860c01971625baae8bdd338e517b836a2f70dd1f7aa3a6b2fc5b5
12+
--hash=sha256:b36993e92ca9375a219c99e606a122ff365a760a2d4bba0caa09bd5278b608b7
13+
build==1.3.0; python_version >= '3.9'
14+
--hash=sha256:7145f0b5061ba90a1500d60bd1b13ca0a8a4cebdd0cc16ed8adf1c0e739f43b4
15+
--hash=sha256:698edd0ea270bde950f53aed21f3a0135672206f3911e0176261a31e0e07b397

0 commit comments

Comments
 (0)