2727 PYTHONDONTWRITEBYTECODE : 1
2828 FORCE_COLOR : 1 # colored output by pytest etc.
2929
30+ permissions : {}
31+
3032jobs :
3133
3234 build-wheel :
3335 name : Build python wheel
3436 runs-on : ubuntu-24.04
3537 steps :
36- - uses : actions/checkout@v4
37- # update the version
38- - name : Get short commit SHA
39- run : |
40- if [ "${{ github.event_name }}" = "pull_request" ]; then
41- SHA="${{ github.event.pull_request.head.sha }}"
42- else
43- SHA="${{ github.sha }}"
44- fi
45- echo "SHA=$(git rev-parse --short $SHA)" >> $GITHUB_ENV
46- - name : Get current version (MAJOR.MINOR.PATCH)
47- id : current-version
48- run : echo "current_version=$(grep -Po '(?<=__version__ = ")[\d\w.]+(?=")' rdmo/__init__.py)" >> $GITHUB_OUTPUT
49- - name : Generate new version (current version + SHA)
50- id : new-version
51- run : echo "new_version=${{ steps.current-version.outputs.current_version }}+$SHA" >> $GITHUB_OUTPUT
52- - name : Update version in rdmo/__init__.py
53- run : |
54- sed -i "s/__version__ = .*/__version__ = \"${{ steps.new-version.outputs.new_version }}\"/" rdmo/__init__.py
38+ - uses : actions/checkout@v6
39+ with :
40+ persist-credentials : false
41+ fetch-depth : 0 # important for setuptools_scm
5542 # build the webpack bundle
56- - uses : actions/setup-node@v4
43+ - uses : actions/setup-node@v6
5744 with :
5845 node-version : 22
5946 cache : npm
6047 - run : npm ci && npm run build:dist
61- # build the wheel
62- - uses : actions/setup-python@v5
63- with :
64- python-version : ' 3.13'
65- cache : pip
66- - run : |
67- python -m pip install --upgrade pip build[uv] twine
68- python -m pip --version
69- - name : Build the wheel
70- run : python -m build --installer=uv
71- - name : Check the metadata of wheel and sdist
72- run : python -m twine check --strict dist/*
73- - name : Install package from built wheel
74- run : python -m pip install --no-compile dist/rdmo*.whl # do not create __pycache__/*.pyc files
75- - name : Write info to step summary
76- run : |
77- {
78- echo -e "# ✓ Wheel successfully built (v${{ steps.new-version.outputs.new_version }})\n\n"
79- echo '<details><summary>Information about installed wheel</summary>'
80- echo -e "\n\`\`\`console"
81- echo "$ python -m pip show --files --verbose rdmo"
82- python -m pip show --files --verbose rdmo
83- echo -e "\`\`\`\n</details>"
84- } >> $GITHUB_STEP_SUMMARY
85- - name : Upload wheel as artifact
86- uses : actions/upload-artifact@v4
87- with :
88- name : wheel
89- path : dist/rdmo*.whl
90- if-no-files-found : error
91- retention-days : 30
48+ - name : Build and inspect package
49+ uses : hynek/build-and-inspect-python-package@efb823f52190ad02594531168b7a2d5790e66516 # v2.14.0
9250
9351 test :
9452 name : " Test (Python: ${{ matrix.python-version }}, DB: ${{ matrix.db-backend }})"
9553 needs : build-wheel
9654 runs-on : ubuntu-24.04
9755 strategy :
9856 matrix :
99- python-version : ['3.9 ', '3.13']
57+ python-version : ['3.10 ', '3.13']
10058 db-backend : [mysql, postgres]
10159 steps :
102- - uses : actions/checkout@v4
60+ - uses : actions/checkout@v6
61+ with :
62+ persist-credentials : false
10363 - name : Set up Python ${{ matrix.python-version }}
104- uses : actions/setup-python@v5
64+ uses : actions/setup-python@v6
10565 with :
10666 python-version : ${{ matrix.python-version }}
10767 cache : pip
10868 - name : Download wheel
109- uses : actions/download-artifact@v4
69+ uses : actions/download-artifact@v6
11070 with :
111- name : wheel
71+ name : Packages
11272 path : dist
11373 - name : Install Dependencies
11474 run : |
@@ -141,10 +101,12 @@ jobs:
141101 env :
142102 GITHUB_DB_BACKEND : ${{ matrix.db-backend }}
143103 - name : Upload coverage data to coveralls.io
144- uses : coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
104+ uses : coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7
145105 with :
146106 flag-name : ' ${{ matrix.db-backend }}: ${{ matrix.python-version }}'
147107 parallel : true
108+ fail-on-error : false
109+ allow-empty : true
148110
149111 test-e2e :
150112 name : " End-to-end Test (Python: ${{ matrix.python-version }}, DB: ${{ matrix.db-backend }})"
@@ -155,16 +117,18 @@ jobs:
155117 python-version : ['3.13']
156118 db-backend : [postgres]
157119 steps :
158- - uses : actions/checkout@v4
120+ - uses : actions/checkout@v6
121+ with :
122+ persist-credentials : false
159123 - name : Set up Python ${{ matrix.python-version }}
160- uses : actions/setup-python@v5
124+ uses : actions/setup-python@v6
161125 with :
162126 python-version : ${{ matrix.python-version }}
163127 cache : pip
164128 - name : Download wheel
165- uses : actions/download-artifact@v4
129+ uses : actions/download-artifact@v6
166130 with :
167- name : wheel
131+ name : Packages
168132 path : dist
169133 - name : Install Dependencies
170134 run : |
@@ -190,7 +154,7 @@ jobs:
190154 env :
191155 DJANGO_DEBUG : True
192156 GITHUB_DB_BACKEND : ${{ matrix.db-backend }}
193- - uses : actions/upload-artifact@v4
157+ - uses : actions/upload-artifact@v5
194158 with :
195159 name : screenshots
196160 path : screenshots/**/*.png
@@ -202,9 +166,10 @@ jobs:
202166 runs-on : ubuntu-24.04
203167 steps :
204168 - name : Run Coveralls finish
205- uses : coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
169+ uses : coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7
206170 with :
207171 parallel-finished : true
172+ fail-on-error : false
208173
209174 dev-setup :
210175 # Ref: structlog (MIT licensed) <https://github.com/hynek/structlog/blob/main/.github/workflows/ci.yml>
@@ -214,8 +179,10 @@ jobs:
214179 matrix :
215180 os : [ubuntu-latest, windows-latest, macos-latest]
216181 steps :
217- - uses : actions/checkout@v4
218- - uses : actions/setup-python@v5
182+ - uses : actions/checkout@v6
183+ with :
184+ persist-credentials : false
185+ - uses : actions/setup-python@v6
219186 with :
220187 python-version : " 3.13"
221188 cache : pip
@@ -227,24 +194,26 @@ jobs:
227194 needs : build-wheel
228195 runs-on : ubuntu-24.04
229196 steps :
230- - uses : actions/checkout@v4
231- - uses : actions/setup-python@v5
197+ - uses : actions/checkout@v6
198+ with :
199+ persist-credentials : false
200+ - uses : actions/setup-python@v6
232201 with :
233202 python-version : " 3.13"
234203 cache : pip
235204 - name : Download wheel
236- uses : actions/download-artifact@v4
205+ uses : actions/download-artifact@v6
237206 with :
238- name : wheel
207+ name : Packages
239208 path : dist
240209 - name : Install os requirements for python-ldap
241210 run : sudo apt-get update && sudo apt-get install --yes libldap2-dev libsasl2-dev
242211 - run : python -m pip install --upgrade pip
243212 - name : Install rdmo wheel with all optional dependency groups
244- run : python -m pip install --no-compile "$(ls dist/*.whl)[allauth,ci,dev,gunicorn,ldap,mysql,postgres,pytest ]"
213+ run : python -m pip install --no-compile "$(ls dist/*.whl)[all ]"
245214 - name : Verify installed packages have compatible dependencies
246215 run : python -m pip check
247- - uses : actions/setup-node@v4
216+ - uses : actions/setup-node@v6
248217 with :
249218 node-version : 22
250219 cache : npm
@@ -286,6 +255,6 @@ jobs:
286255 - dependencies
287256 runs-on : ubuntu-24.04
288257 steps :
289- - uses : re-actors/alls-green@release/v1
258+ - uses : re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
290259 with :
291260 jobs : ${{ toJSON(needs) }}
0 commit comments