Skip to content

Commit e6010cb

Browse files
committed
Fixed location of constraints in the CI workflows
1 parent bae389c commit e6010cb

3 files changed

Lines changed: 27 additions & 27 deletions

File tree

.github/workflows/pip-audit.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ jobs:
2929
pip install pip-audit
3030
# - name: 'Freeze Python ${{ matrix.python-version }} constraints'
3131
# run: |
32-
# pip freeze > constraints-${{ matrix.python-version }}.txt
32+
# pip freeze > installation/constraints-${{ matrix.python-version }}.txt
3333
- id: gen-cve-output
3434
run: |
3535
source /tmp/PIPAUDIT/bin/activate
3636
set +e
37-
if [ -f constraints-${{ matrix.python-version }}.txt ] ; then
38-
pip-audit --desc=on --progress-spinner=off -r constraints-${{ matrix.python-version }}.txt --no-deps --disable-pip -f markdown -o /tmp/report-before.md
37+
if [ -f installation/constraints-${{ matrix.python-version }}.txt ] ; then
38+
pip-audit --desc=on --progress-spinner=off -r installation/constraints-${{ matrix.python-version }}.txt --no-deps --disable-pip -f markdown -o /tmp/report-before.md
3939
refreeze=$?
4040
else
4141
touch /tmp/report-before.md
@@ -49,13 +49,13 @@ jobs:
4949
source /tmp/PIPFREEZE/bin/activate
5050
pip install --upgrade pip wheel
5151
pip install -r installation/requirements.txt
52-
pip freeze > constraints-${{ matrix.python-version }}.txt
52+
pip freeze > installation/constraints-${{ matrix.python-version }}.txt
5353
5454
# Re-audit the populated environment
5555
deactivate
5656
source /tmp/PIPAUDIT/bin/activate
5757
set +e
58-
pip-audit --desc=on --progress-spinner=off -r constraints-${{ matrix.python-version }}.txt --no-deps --disable-pip -f markdown -o /tmp/report-after.md
58+
pip-audit --desc=on --progress-spinner=off -r installation/constraints-${{ matrix.python-version }}.txt --no-deps --disable-pip -f markdown -o /tmp/report-after.md
5959
auditres=$?
6060
set -e
6161
@@ -74,7 +74,7 @@ jobs:
7474
name: audit-${{ matrix.python-version }}
7575
retention-days: 2
7676
path: |
77-
constraints-${{ matrix.python-version }}.txt
77+
installation/constraints-${{ matrix.python-version }}.txt
7878
audit-report-${{ matrix.python-version }}.md
7979
8080
pull_request_changes:
@@ -100,13 +100,13 @@ jobs:
100100
run: |
101101
skip=true
102102
if [ -d "${{steps.download.outputs.download-path}}" ] ; then
103-
for con in "${{steps.download.outputs.download-path}}"/constraints-*.txt ; do
103+
for con in "${{steps.download.outputs.download-path}}"/installation/constraints-*.txt ; do
104104
case "$con" in
105105
*/constraints-\*.txt)
106106
break
107107
;;
108108
*)
109-
cp -p "$con" .
109+
cp -p "$con" installation
110110
skip=false
111111
;;
112112
esac
@@ -132,7 +132,7 @@ jobs:
132132
with:
133133
title: Updated constraints due security reasons (triggered on ${{ steps.timestamp.outputs.timestamp }} by ${{ github.sha }})
134134
branch: create-pull-request/patch-audit-constraints
135-
add-paths: constraints-*.txt
135+
add-paths: installation/constraints-*.txt
136136
delete-branch: true
137137
commit-message: "[create-pull-request] Automatically updated constraints due security reasons"
138138
body-path: pull-body.md

.github/workflows/pre-commit.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
push:
77
branches: [exec]
88
paths-ignore:
9-
- 'constraints-*[0-9].txt'
9+
- 'installation/constraints-*[0-9].txt'
1010

1111
jobs:
1212
pre-commit:
@@ -31,7 +31,7 @@ jobs:
3131
- name: 'Install requirements (standard or constraints ${{ matrix.python-version }})'
3232
run: |
3333
pip install --upgrade pip wheel
34-
constraints_file="constraints-${{ matrix.python-version }}.txt"
34+
constraints_file="installation/constraints-${{ matrix.python-version }}.txt"
3535
regen_constraints=
3636
if [ -f "$constraints_file" ] ; then
3737
at="$(git --no-pager log -p -1 "--format=tformat:%at" --no-patch -- "$constraints_file")"
@@ -52,7 +52,7 @@ jobs:
5252
fi
5353
- name: 'Install development requirements'
5454
run: |
55-
pip install -r installation/dev-requirements.txt -r installation/mypy-requirements.txt -c constraints-${{ matrix.python-version }}.txt-relaxed
55+
pip install -r installation/dev-requirements.txt -r installation/mypy-requirements.txt -c installation/constraints-${{ matrix.python-version }}.txt-relaxed
5656
- name: MyPy cache
5757
uses: actions/cache@v5
5858
with:
@@ -98,12 +98,12 @@ jobs:
9898
# continue-on-error: true
9999
uses: pilosus/action-pip-license-checker@v3.1.0
100100
with:
101-
requirements: constraints-${{ matrix.python-version }}.txt
101+
requirements: installation/constraints-${{ matrix.python-version }}.txt
102102
# - name: Check transitive dependencies licences
103103
# id: license_check_report
104104
# uses: pilosus/action-pip-license-checker@v3.1.0
105105
# with:
106-
# requirements: constraints-${{ matrix.python-version }}.txt
106+
# requirements: installation/constraints-${{ matrix.python-version }}.txt
107107
# fail: 'StrongCopyleft'
108108
# exclude: '(?i)^(pylint|dulwich|docutils).*'
109109
- name: Print licences report
@@ -113,7 +113,7 @@ jobs:
113113
with:
114114
name: pre-commit-${{ matrix.python-version }}
115115
retention-days: 2
116-
path: constraints-${{ matrix.python-version }}.txt
116+
path: installation/constraints-${{ matrix.python-version }}.txt
117117

118118
pull_request_changes:
119119
# Do this only when it is not a pull request validation
@@ -138,13 +138,13 @@ jobs:
138138
run: |
139139
skip=true
140140
if [ -d "${{steps.download.outputs.download-path}}" ] ; then
141-
for con in "${{steps.download.outputs.download-path}}"/constraints-*.txt ; do
141+
for con in "${{steps.download.outputs.download-path}}"/installation/constraints-*.txt ; do
142142
case "$con" in
143143
*/constraints-\*.txt)
144144
break
145145
;;
146146
*)
147-
cp -p "$con" .
147+
cp -p "$con" installation
148148
skip=false
149149
;;
150150
esac
@@ -158,7 +158,7 @@ jobs:
158158
with:
159159
title: Updated constraints (triggered on ${{ steps.timestamp.outputs.timestamp }} by ${{ github.sha }})
160160
branch: create-pull-request/patch-constraints
161-
add-paths: constraints-*.txt
161+
add-paths: installation/constraints-*.txt
162162
delete-branch: true
163163
commit-message: "[create-pull-request] Automatically commit updated contents (constraints)"
164164
- name: Check outputs

.github/workflows/pre-commit_wsl.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
#push:
77
# branches: [exec]
88
# paths-ignore:
9-
# - 'constraints-*_*-wsl.txt'
9+
# - 'installation/constraints-*_*-wsl.txt'
1010

1111
jobs:
1212
pre-commit:
@@ -92,7 +92,7 @@ jobs:
9292
source .env/bin/activate
9393
9494
pip install --upgrade pip wheel
95-
constraints_file="constraints-${{ matrix.python-version }}_${{ matrix.distribution }}-wsl.txt"
95+
constraints_file="installation/constraints-${{ matrix.python-version }}_${{ matrix.distribution }}-wsl.txt"
9696
regen_constraints=
9797
if [ -f "$constraints_file" ] ; then
9898
at="$(git --no-pager log -p -1 "--format=tformat:%at" --no-patch -- "$constraints_file")"
@@ -118,7 +118,7 @@ jobs:
118118
cd the_repo
119119
source .env/bin/activate
120120
121-
pip install -r installation/dev-requirements.txt -r installation/mypy-requirements.txt -c constraints-${{ matrix.python-version }}_${{ matrix.distribution }}-wsl.txt-relaxed
121+
pip install -r installation/dev-requirements.txt -r installation/mypy-requirements.txt -c installation/constraints-${{ matrix.python-version }}_${{ matrix.distribution }}-wsl.txt-relaxed
122122
# - name: MyPy cache
123123
# uses: actions/cache@v5
124124
# with:
@@ -171,7 +171,7 @@ jobs:
171171
with:
172172
name: wsl_pre-commit-${{ matrix.python-version }}_${{ matrix.distribution }}
173173
retention-days: 2
174-
path: the_repo/constraints-${{ matrix.python-version }}_${{ matrix.distribution }}-wsl.txt
174+
path: the_repo/installation/constraints-${{ matrix.python-version }}_${{ matrix.distribution }}-wsl.txt
175175

176176
check_licences:
177177
runs-on: ubuntu-latest
@@ -196,12 +196,12 @@ jobs:
196196
# continue-on-error: true
197197
uses: pilosus/action-pip-license-checker@v3.1.0
198198
with:
199-
requirements: constraints-${{ matrix.python-version }}_${{ matrix.distribution }}-wsl.txt
199+
requirements: installation/constraints-${{ matrix.python-version }}_${{ matrix.distribution }}-wsl.txt
200200
# - name: Check transitive dependencies licences
201201
# id: license_check_report
202202
# uses: pilosus/action-pip-license-checker@v3.1.0
203203
# with:
204-
# requirements: constraints-${{ matrix.python-version }}.txt
204+
# requirements: installation/constraints-${{ matrix.python-version }}.txt
205205
# fail: 'StrongCopyleft'
206206
# exclude: '(?i)^(pylint|dulwich|docutils).*'
207207
- name: Print licences report
@@ -231,13 +231,13 @@ jobs:
231231
run: |
232232
skip=true
233233
if [ -d "${{steps.download.outputs.download-path}}" ] ; then
234-
for con in "${{steps.download.outputs.download-path}}"/constraints-*_*-wsl.txt ; do
234+
for con in "${{steps.download.outputs.download-path}}"/installation/constraints-*_*-wsl.txt ; do
235235
case "$con" in
236236
*/constraints-\*_\*-wsl.txt)
237237
break
238238
;;
239239
*)
240-
cp -p "$con" .
240+
cp -p "$con" installation
241241
skip=false
242242
;;
243243
esac
@@ -251,7 +251,7 @@ jobs:
251251
with:
252252
title: Updated WSL constraints (triggered on ${{ steps.timestamp.outputs.timestamp }} by ${{ github.sha }})
253253
branch: create-pull-request/patch-wsl_constraints
254-
add-paths: constraints-*_*-wsl.txt
254+
add-paths: installation/constraints-*_*-wsl.txt
255255
delete-branch: true
256256
commit-message: "[create-pull-request] Automatically commit updated contents (constraints WSL)"
257257
- name: Check outputs

0 commit comments

Comments
 (0)