Skip to content

Commit 370c306

Browse files
authored
v7.4.2
2 parents 1ac3124 + c0f5c9f commit 370c306

File tree

3 files changed

+48
-3
lines changed

3 files changed

+48
-3
lines changed

.github/workflows/ApplicationTesting.yml

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ on:
3737
requirements:
3838
description: 'Python dependencies to be installed through pip.'
3939
required: false
40-
default: '-r tests/requirements.txt'
40+
default: '-r ./requirements.txt'
4141
type: string
4242
pacboy:
4343
description: 'MSYS2 dependencies to be installed through pacboy (pacman).'
@@ -94,6 +94,39 @@ jobs:
9494
name: ${{ inputs.wheel }}
9595
path: install
9696

97+
# TODO: extract step to an Action so package, so code can be shared with UnitTesting.yml
98+
- name: Compute path to requirements file
99+
id: requirements
100+
shell: python
101+
run: |
102+
from os import getenv
103+
from pathlib import Path
104+
from sys import version
105+
106+
print(f"Python: {version}")
107+
108+
requirements = "${{ inputs.requirements }}"
109+
if requirements.startswith("-r"):
110+
requirements = requirements[2:].lstrip()
111+
if requirements.startswith("./"):
112+
requirementsFile = Path("${{ inputs.root_directory || '.' }}") / Path("${{ inputs.tests_directory || '.' }}") / Path("${{ inputs.apptest_directory || '.' }}") / Path(requirements[2:])
113+
else:
114+
requirementsFile = Path(requirements)
115+
116+
if not requirementsFile.exists():
117+
print(f"::error title=FileNotFoundError::{requirementsFile}")
118+
exit(1)
119+
120+
print(f"requirements file: {requirementsFile.as_posix()}")
121+
122+
# Write requirements path to special file
123+
github_output = Path(getenv("GITHUB_OUTPUT"))
124+
print(f"GITHUB_OUTPUT: {github_output}")
125+
with github_output.open("a+") as f:
126+
f.write(f"requirements=-r {requirementsFile.as_posix()}\n")
127+
else:
128+
print(f"requirements list: {requirements}")
129+
97130
# TODO: extract step to an Action so package lists are shared with UnitTesting (and GHDL?)
98131
- name: Compute pacman/pacboy packages
99132
id: pacboy
@@ -122,7 +155,7 @@ jobs:
122155
123156
return requirements
124157
125-
requirements = "${{ inputs.requirements }}"
158+
requirements = "${{ steps.requirements.outputs.requirements }}"
126159
if requirements.startswith("-r"):
127160
requirementsFile = Path(requirements[2:].lstrip())
128161
try:
@@ -191,6 +224,8 @@ jobs:
191224
with github_output.open("a+") as f:
192225
f.write(f"pacboy_packages={' '.join(pacboyPackages)}\n")
193226
227+
# Python setup
228+
194229
- name: '🟦 Setup MSYS2 for ${{ matrix.runtime }}'
195230
uses: msys2/setup-msys2@v2
196231
if: matrix.system == 'msys2'
@@ -207,6 +242,8 @@ jobs:
207242
with:
208243
python-version: ${{ matrix.python }}
209244

245+
# Python Dependency steps
246+
210247
- name: 🔧 Install wheel and pip dependencies (native)
211248
if: matrix.system != 'msys2'
212249
run: |
@@ -222,6 +259,8 @@ jobs:
222259
python -m pip install --disable-pip-version-check --break-system-packages ${{ inputs.requirements }}
223260
fi
224261
262+
# TODO: Before scripts?
263+
225264
- name: 🔧 Install wheel from artifact (Ubuntu/macOS)
226265
if: ( matrix.system != 'windows' && matrix.system != 'windows-arm' )
227266
run: |
@@ -232,6 +271,8 @@ jobs:
232271
run: |
233272
python -m pip install -v --disable-pip-version-check (Get-Item .\install\*.whl).FullName
234273
274+
# Run pytests
275+
235276
- name: ✅ Run application tests (Ubuntu/macOS)
236277
if: ( matrix.system != 'windows' && matrix.system != 'windows-arm' )
237278
run: |
@@ -262,6 +303,8 @@ jobs:
262303
python -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.apptest_directory }}
263304
}
264305
306+
# Upload artifacts
307+
265308
- name: 📤 Upload 'TestReportSummary.xml' artifact
266309
if: inputs.apptest_xml_artifact != ''
267310
uses: pyTooling/upload-artifact@v6

.github/workflows/UnitTesting.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ jobs:
215215
# run: |
216216
# py -3.12 -m pip install --disable-pip-version-check --break-system-packages -U tomli
217217

218+
# TODO: extract step to an Action so package, so code can be shared with AppTesting.yml
218219
- name: Compute path to requirements file
219220
id: requirements
220221
shell: python
@@ -247,6 +248,7 @@ jobs:
247248
else:
248249
print(f"requirements list: {requirements}")
249250
251+
# TODO: extract step to an Action so package lists are shared with UnitTesting (and GHDL?)
250252
- name: Compute pacman/pacboy packages
251253
id: pacboy
252254
if: matrix.system == 'msys2'

myPackage/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
__email__ = "Paebbels@gmail.com"
3737
__copyright__ = "2017-2026, Patrick Lehmann"
3838
__license__ = "Apache License, Version 2.0"
39-
__version__ = "7.4.1"
39+
__version__ = "7.4.2"
4040
__keywords__ = ["GitHub Actions"]
4141
__issue_tracker__ = "https://GitHub.com/pyTooling/Actions/issues"
4242

0 commit comments

Comments
 (0)