Compare commits

..

29 Commits
v4.2.0 ... r3

Author SHA1 Message Date
Patrick Lehmann
899a5f53bc v3.1.1 2024-12-08 23:46:42 +01:00
Patrick Lehmann
5925101578 v3.1.0 2024-12-08 21:30:48 +01:00
Patrick Lehmann
1b0acf206c v3.0.0 2024-12-08 11:03:28 +01:00
Patrick Lehmann
a0c016bf79 v2.1.1 2024-11-10 21:17:21 +01:00
Patrick Lehmann
40217006fd v2.1.0 2024-11-10 19:07:31 +01:00
Patrick Lehmann
99f30dab53 v2.0.0 2024-11-10 11:23:27 +01:00
Patrick Lehmann
1c42072471 v1.1.0 2024-09-27 22:00:06 +02:00
Patrick Lehmann
74afc5a42a Merge branch 'main' into r1 2024-08-06 10:33:22 +02:00
Patrick Lehmann
2e5a79e0c2 Merge remote-tracking branch 'github/main' into r1 2024-07-30 07:35:49 +02:00
Patrick Lehmann
db99e35dec v1.0.5 2024-04-24 23:07:34 +02:00
Patrick Lehmann
6cfc6e0f8f Merge branch 'main' into r1 2024-04-24 00:42:05 +02:00
Patrick Lehmann
5adddda1a1 Merge remote-tracking branch 'github/main' into r1 2024-04-24 00:32:50 +02:00
Patrick Lehmann
91289c4257 v1.0.1 2024-02-01 00:24:24 +01:00
Patrick Lehmann
527e94b245 v1.0.0 2024-01-19 01:18:27 +01:00
umarcor
f11c335674 v0.4.6 2023-02-26 17:46:26 +01:00
umarcor
5bed864443 v0.4.5 2022-11-08 03:26:27 +01:00
Unai Martinez-Corral
37ec436eb4 v0.4.4 2022-11-08 00:06:47 +00:00
umarcor
6a7a4212c3 v0.4.3 2022-03-02 23:51:16 +01:00
umarcor
f5b6f17d4e v0.4.2 2022-02-22 21:48:31 +01:00
umarcor
883238547a v0.4.1 2022-01-17 01:30:55 +01:00
umarcor
7cd852db58 v0.4.0 2022-01-09 20:58:38 +01:00
umarcor
ce0d30fe3f v0.3.0 2021-12-26 01:45:35 +01:00
umarcor
34dacf7bcf v0.2.3 2021-12-21 01:03:20 +01:00
umarcor
48090e113d v0.2.2 2021-12-20 20:47:43 +01:00
umarcor
e082d77e7a v0.2.1 2021-12-16 07:40:36 +01:00
umarcor
181035b0ba v0.2.0 2021-12-16 07:18:39 +01:00
Patrick Lehmann
643f95bbb6 v0.1.0 2021-12-07 20:50:03 +01:00
umarcor
424b75ca96 v0.0.1 2021-12-07 03:39:33 +01:00
umarcor
f0610331b9 v0.0.0 2021-12-01 00:03:09 +01:00
43 changed files with 624 additions and 688 deletions

View File

@@ -10,7 +10,9 @@ updates:
- Dependencies - Dependencies
assignees: assignees:
- Paebbels - Paebbels
- umarcor
reviewers: reviewers:
- Paebbels - Paebbels
- umarcor
schedule: schedule:
interval: "daily" # Checks on Monday trough Friday. interval: "daily" # Checks on Monday trough Friday.

View File

@@ -188,8 +188,8 @@ jobs:
f.write(f"pacboy_packages={' '.join(pacboyPackages)}\n") f.write(f"pacboy_packages={' '.join(pacboyPackages)}\n")
- name: '🟦 Setup MSYS2 for ${{ matrix.runtime }}' - name: '🟦 Setup MSYS2 for ${{ matrix.runtime }}'
uses: msys2/setup-msys2@v2
if: matrix.system == 'msys2' if: matrix.system == 'msys2'
uses: msys2/setup-msys2@v2
with: with:
msystem: ${{ matrix.runtime }} msystem: ${{ matrix.runtime }}
update: true update: true
@@ -198,8 +198,8 @@ jobs:
${{ inputs.pacboy }} ${{ inputs.pacboy }}
- name: 🐍 Setup Python ${{ matrix.python }} - name: 🐍 Setup Python ${{ matrix.python }}
uses: actions/setup-python@v5
if: matrix.system != 'msys2' if: matrix.system != 'msys2'
uses: actions/setup-python@v5
with: with:
python-version: ${{ matrix.python }} python-version: ${{ matrix.python }}
@@ -231,10 +231,10 @@ jobs:
cd "${{ inputs.root_directory || '.' }}" cd "${{ inputs.root_directory || '.' }}"
[ -n '${{ inputs.apptest_xml_artifact }}' ] && PYTEST_ARGS='--junitxml=report/unit/TestReportSummary.xml' || unset PYTEST_ARGS [ -n '${{ inputs.apptest_xml_artifact }}' ] && PYTEST_ARGS='--junitxml=report/unit/TestReportSummary.xml' || unset PYTEST_ARGS
if [ -n '${{ inputs.coverage_config }}' ]; then if [ -n '${{ inputs.coverage_config }}' ]; then
printf "%s\n" "coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.apptest_directory }}" echo "coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.apptest_directory }}"
coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.apptest_directory }} coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.apptest_directory }}
else else
printf "%s\n" "python -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.apptest_directory }}" echo "python -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.apptest_directory }}"
python -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.apptest_directory }} python -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.apptest_directory }}
fi fi

View File

@@ -47,13 +47,13 @@ jobs:
steps: steps:
- name: 🗑️ Delete package Artifacts - name: 🗑️ Delete package Artifacts
uses: geekyeggo/delete-artifact@v5
if: ${{ ! startsWith(github.ref, 'refs/tags') }} if: ${{ ! startsWith(github.ref, 'refs/tags') }}
uses: geekyeggo/delete-artifact@v5
with: with:
name: ${{ inputs.package }} name: ${{ inputs.package }}
- name: 🗑️ Delete remaining Artifacts - name: 🗑️ Delete remaining Artifacts
uses: geekyeggo/delete-artifact@v5
if: ${{ inputs.remaining != '' }} if: ${{ inputs.remaining != '' }}
uses: geekyeggo/delete-artifact@v5
with: with:
name: ${{ inputs.remaining }} name: ${{ inputs.remaining }}

View File

@@ -38,7 +38,7 @@ jobs:
steps: steps:
- name: '❗ Deprecation message' - name: '❗ Deprecation message'
run: printf "%s\n" "::warning title=Deprecated::'BuildTheDocs.yml' is not maintained anymore. Please switch to 'SphinxDocumentation.yml', 'LaTeXDocumentation.yml' and 'ExtractConfiguration.yml'." run: echo "::warning title=Deprecated::'BuildTheDocs.yml' is not maintained anymore. Please switch to 'SphinxDocumentation.yml', 'LaTeXDocumentation.yml' and 'ExtractConfiguration.yml'."
- name: ⏬ Checkout repository - name: ⏬ Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -49,8 +49,8 @@ jobs:
skip-deploy: true skip-deploy: true
- name: 📤 Upload 'documentation' artifacts - name: 📤 Upload 'documentation' artifacts
uses: pyTooling/upload-artifact@v4
if: inputs.artifact != '' if: inputs.artifact != ''
uses: pyTooling/upload-artifact@v4
with: with:
name: ${{ inputs.artifact }} name: ${{ inputs.artifact }}
working-directory: doc/_build/html working-directory: doc/_build/html

View File

@@ -59,14 +59,14 @@ jobs:
- name: 🔧 Install wheel,tomli and pip dependencies (native) - name: 🔧 Install wheel,tomli and pip dependencies (native)
run: | run: |
python -m pip install --disable-pip-version-check -U docstr_coverage interrogate[png] python -m pip install --disable-pip-version-check -U docstr_coverage interrogate
- name: Run 'interrogate' Documentation Coverage Check - name: Run 'interrogate' Documentation Coverage Check
continue-on-error: true continue-on-error: true
run: | run: |
interrogate -c pyproject.toml --fail-under=${{ inputs.fail_under }} && printf "%s\n" "::error title=interrogate::Insufficient documentation quality (goal: ${{ inputs.fail_under }})" interrogate -c pyproject.toml --fail-under=${{ inputs.fail_under }} && echo "::error title=interrogate::Insufficient documentation quality (goal: ${{ inputs.fail_under }})"
- name: Run 'docstr_coverage' Documentation Coverage Check - name: Run 'docstr_coverage' Documentation Coverage Check
continue-on-error: true continue-on-error: true
run: | run: |
docstr-coverage -v 2 --fail-under=${{ inputs.fail_under }} ${{ inputs.directory }} && printf "%s\n" "::error title=docstr-coverage::Insufficient documentation quality (goal: ${{ inputs.fail_under }})" docstr-coverage -v 2 --fail-under=${{ inputs.fail_under }} ${{ inputs.directory }} && echo "::error title=docstr-coverage::Insufficient documentation quality (goal: ${{ inputs.fail_under }})"

View File

@@ -103,13 +103,13 @@ on:
jobs: jobs:
ConfigParams: ConfigParams:
uses: pyTooling/Actions/.github/workflows/ExtractConfiguration.yml@main uses: pyTooling/Actions/.github/workflows/ExtractConfiguration.yml@r2
with: with:
package_namespace: ${{ inputs.package_namespace }} package_namespace: ${{ inputs.package_namespace }}
package_name: ${{ inputs.package_name }} package_name: ${{ inputs.package_name }}
UnitTestingParams: UnitTestingParams:
uses: pyTooling/Actions/.github/workflows/Parameters.yml@main uses: pyTooling/Actions/.github/workflows/Parameters.yml@r2
with: with:
package_namespace: ${{ inputs.package_namespace }} package_namespace: ${{ inputs.package_namespace }}
package_name: ${{ inputs.package_name }} package_name: ${{ inputs.package_name }}
@@ -121,7 +121,7 @@ jobs:
disable_list: ${{ inputs.unittest_disable_list }} disable_list: ${{ inputs.unittest_disable_list }}
AppTestingParams: AppTestingParams:
uses: pyTooling/Actions/.github/workflows/Parameters.yml@main uses: pyTooling/Actions/.github/workflows/Parameters.yml@r2
with: with:
package_namespace: ${{ inputs.package_namespace }} package_namespace: ${{ inputs.package_namespace }}
package_name: ${{ inputs.package_name }} package_name: ${{ inputs.package_name }}
@@ -133,22 +133,18 @@ jobs:
disable_list: ${{ inputs.apptest_disable_list }} disable_list: ${{ inputs.apptest_disable_list }}
UnitTesting: UnitTesting:
uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@main uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@r2
needs: needs:
- ConfigParams
- UnitTestingParams - UnitTestingParams
with: with:
jobs: ${{ needs.UnitTestingParams.outputs.python_jobs }} jobs: ${{ needs.UnitTestingParams.outputs.python_jobs }}
requirements: "-r tests/unit/requirements.txt" requirements: "-r tests/unit/requirements.txt"
# pacboy: "msys/git python-lxml:p" # pacboy: "msys/git python-lxml:p"
unittest_report_xml_directory: ${{ needs.ConfigParams.outputs.unittest_report_xml_directory }} unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
unittest_report_xml_filename: ${{ needs.ConfigParams.outputs.unittest_report_xml_filename }} coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}
coverage_report_html_directory: ${{ needs.ConfigParams.outputs.coverage_report_html_directory }}
unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}
StaticTypeCheck: StaticTypeCheck:
uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@main uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@r2
needs: needs:
- ConfigParams - ConfigParams
- UnitTestingParams - UnitTestingParams
@@ -161,7 +157,7 @@ jobs:
html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }} html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}
DocCoverage: DocCoverage:
uses: pyTooling/Actions/.github/workflows/CheckDocumentation.yml@main uses: pyTooling/Actions/.github/workflows/CheckDocumentation.yml@r2
needs: needs:
- ConfigParams - ConfigParams
- UnitTestingParams - UnitTestingParams
@@ -171,7 +167,7 @@ jobs:
# fail_below: 70 # fail_below: 70
Package: Package:
uses: pyTooling/Actions/.github/workflows/Package.yml@main uses: pyTooling/Actions/.github/workflows/Package.yml@r2
needs: needs:
- UnitTestingParams - UnitTestingParams
- UnitTesting - UnitTesting
@@ -180,7 +176,7 @@ jobs:
artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }} artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}
# AppTesting: # AppTesting:
# uses: pyTooling/Actions/.github/workflows/ApplicationTesting.yml@main # uses: pyTooling/Actions/.github/workflows/ApplicationTesting.yml@r2
# needs: # needs:
# - AppTestingParams # - AppTestingParams
# - UnitTestingParams # - UnitTestingParams
@@ -191,7 +187,7 @@ jobs:
# apptest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).apptesting_xml }} # apptest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).apptesting_xml }}
PublishCoverageResults: PublishCoverageResults:
uses: pyTooling/Actions/.github/workflows/PublishCoverageResults.yml@main uses: pyTooling/Actions/.github/workflows/PublishCoverageResults.yml@r2
needs: needs:
- UnitTestingParams - UnitTestingParams
- UnitTesting - UnitTesting
@@ -204,23 +200,22 @@ jobs:
codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }} codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }}
PublishTestResults: PublishTestResults:
uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@main uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@r2
needs: needs:
- UnitTestingParams - UnitTestingParams
- UnitTesting - UnitTesting
with: with:
additional_merge_args: '-d "--pytest=rewrite-dunder-init;reduce-depth:pytest.tests.unit"'
merged_junit_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }} merged_junit_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
# VerifyDocs: # VerifyDocs:
# uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@main # uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@r2
# needs: # needs:
# - UnitTestingParams # - UnitTestingParams
# with: # with:
# python_version: ${{ needs.UnitTestingParams.outputs.python_version }} # python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
Documentation: Documentation:
uses: pyTooling/Actions/.github/workflows/SphinxDocumentation.yml@main uses: pyTooling/Actions/.github/workflows/SphinxDocumentation.yml@r2
needs: needs:
- ConfigParams - ConfigParams
- UnitTestingParams - UnitTestingParams
@@ -236,7 +231,7 @@ jobs:
latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }} latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }}
IntermediateCleanUp: IntermediateCleanUp:
uses: pyTooling/Actions/.github/workflows/IntermediateCleanUp.yml@main uses: pyTooling/Actions/.github/workflows/IntermediateCleanUp.yml@r2
needs: needs:
- UnitTestingParams - UnitTestingParams
- PublishCoverageResults - PublishCoverageResults
@@ -247,7 +242,7 @@ jobs:
xml_unittest_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}- xml_unittest_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}-
# PDFDocumentation: # PDFDocumentation:
# uses: pyTooling/Actions/.github/workflows/LaTeXDocumentation.yml@main # uses: pyTooling/Actions/.github/workflows/LaTeXDocumentation.yml@r2
# needs: # needs:
# - UnitTestingParams # - UnitTestingParams
# - Documentation # - Documentation
@@ -257,7 +252,7 @@ jobs:
# pdf_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_pdf }} # pdf_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_pdf }}
PublishToGitHubPages: PublishToGitHubPages:
uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@main uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@r2
needs: needs:
- UnitTestingParams - UnitTestingParams
- Documentation - Documentation
@@ -270,7 +265,7 @@ jobs:
typing: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }} typing: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}
ReleasePage: ReleasePage:
uses: pyTooling/Actions/.github/workflows/Release.yml@main uses: pyTooling/Actions/.github/workflows/Release.yml@r2
if: startsWith(github.ref, 'refs/tags') if: startsWith(github.ref, 'refs/tags')
needs: needs:
- Package - Package
@@ -278,7 +273,7 @@ jobs:
- PublishToGitHubPages - PublishToGitHubPages
PublishOnPyPI: PublishOnPyPI:
uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@main uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@r2
if: startsWith(github.ref, 'refs/tags') if: startsWith(github.ref, 'refs/tags')
needs: needs:
- UnitTestingParams - UnitTestingParams
@@ -291,7 +286,7 @@ jobs:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
ArtifactCleanUp: ArtifactCleanUp:
uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@main uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@r2
needs: needs:
- UnitTestingParams - UnitTestingParams
- UnitTesting - UnitTesting

View File

@@ -72,7 +72,7 @@ jobs:
steps: steps:
- name: '❗ Deprecation message' - name: '❗ Deprecation message'
run: printf "%s\n" "::warning title=Deprecated::'CoverageCollection.yml' is not maintained anymore. Please switch to 'UnitTesting.yml', 'PublishCoverageResults.yml' and 'PublishTestResults.yml'." run: echo "::warning title=Deprecated::'CoverageCollection.yml' is not maintained anymore. Please switch to 'UnitTesting.yml', 'PublishCoverageResults.yml' and 'PublishTestResults.yml'."
- name: ⏬ Checkout repository - name: ⏬ Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -150,7 +150,7 @@ jobs:
ABSDIR=$(pwd) ABSDIR=$(pwd)
cd "${{ inputs.tests_directory || '.' }}" cd "${{ inputs.tests_directory || '.' }}"
[ -n '${{ inputs.coverage_config }}' ] && PYCOV_ARGS="--cov-config=${ABSDIR}/${{ inputs.coverage_config }}" || unset PYCOV_ARGS [ -n '${{ inputs.coverage_config }}' ] && PYCOV_ARGS="--cov-config=${ABSDIR}/${{ inputs.coverage_config }}" || unset PYCOV_ARGS
printf "%s\n" "python -m pytest -rA --cov=${ABSDIR} ${PYCOV_ARGS} ${{ inputs.unittest_directory }} --color=yes" echo "python -m pytest -rA --cov=${ABSDIR} ${PYCOV_ARGS} ${{ inputs.unittest_directory }} --color=yes"
python -m pytest -rA --cov=${ABSDIR} $PYCOV_ARGS ${{ inputs.unittest_directory }} --color=yes python -m pytest -rA --cov=${ABSDIR} $PYCOV_ARGS ${{ inputs.unittest_directory }} --color=yes
- name: Convert to cobertura format - name: Convert to cobertura format

View File

@@ -59,33 +59,18 @@ on:
mypy_prepare_command: mypy_prepare_command:
description: "" description: ""
value: ${{ jobs.Extract.outputs.mypy_prepare_command }} value: ${{ jobs.Extract.outputs.mypy_prepare_command }}
unittest_report_xml_directory:
description: ""
value: ${{ jobs.Extract.outputs.unittest_report_xml_directory }}
unittest_report_xml_filename:
description: ""
value: ${{ jobs.Extract.outputs.unittest_report_xml_filename }}
unittest_report_xml:
description: ""
value: ${{ jobs.Extract.outputs.unittest_report_xml }}
coverage_report_html_directory: coverage_report_html_directory:
description: "" description: ""
value: ${{ jobs.Extract.outputs.coverage_report_html_directory }} value: ${{ jobs.Extract.outputs.coverage_report_html_directory }}
coverage_report_xml_directory: coverage_report_xml_directory:
description: "" description: ""
value: ${{ jobs.Extract.outputs.coverage_report_xml_directory }} value: ${{ jobs.Extract.outputs.coverage_report_xml_directory }}
coverage_report_xml_filename:
description: ""
value: ${{ jobs.Extract.outputs.coverage_report_xml_filename }}
coverage_report_xml: coverage_report_xml:
description: "" description: ""
value: ${{ jobs.Extract.outputs.coverage_report_xml }} value: ${{ jobs.Extract.outputs.coverage_report_xml }}
coverage_report_json_directory: coverage_report_json_directory:
description: "" description: ""
value: ${{ jobs.Extract.outputs.coverage_report_json_directory }} value: ${{ jobs.Extract.outputs.coverage_report_json_directory }}
coverage_report_json_filename:
description: ""
value: ${{ jobs.Extract.outputs.coverage_report_json_filename }}
coverage_report_json: coverage_report_json:
description: "" description: ""
value: ${{ jobs.Extract.outputs.coverage_report_json }} value: ${{ jobs.Extract.outputs.coverage_report_json }}
@@ -98,15 +83,10 @@ jobs:
package_fullname: ${{ steps.getPackageName.outputs.package_fullname }} package_fullname: ${{ steps.getPackageName.outputs.package_fullname }}
package_directory: ${{ steps.getPackageName.outputs.package_directory }} package_directory: ${{ steps.getPackageName.outputs.package_directory }}
mypy_prepare_command: ${{ steps.getPackageName.outputs.mypy_prepare_command }} mypy_prepare_command: ${{ steps.getPackageName.outputs.mypy_prepare_command }}
unittest_report_xml_directory: ${{ steps.getVariables.outputs.unittest_report_xml_directory }}
unittest_report_xml_filename: ${{ steps.getVariables.outputs.unittest_report_xml_filename }}
unittest_report_xml: ${{ steps.getVariables.outputs.unittest_report_xml }}
coverage_report_html_directory: ${{ steps.getVariables.outputs.coverage_report_html_directory }} coverage_report_html_directory: ${{ steps.getVariables.outputs.coverage_report_html_directory }}
coverage_report_xml_directory: ${{ steps.getVariables.outputs.coverage_report_xml_directory }} coverage_report_xml_directory: ${{ steps.getVariables.outputs.coverage_report_xml_directory }}
coverage_report_xml_filename: ${{ steps.getVariables.outputs.coverage_report_xml_filename }}
coverage_report_xml: ${{ steps.getVariables.outputs.coverage_report_xml }} coverage_report_xml: ${{ steps.getVariables.outputs.coverage_report_xml }}
coverage_report_json_directory: ${{ steps.getVariables.outputs.coverage_report_json_directory }} coverage_report_json_directory: ${{ steps.getVariables.outputs.coverage_report_json_directory }}
coverage_report_json_filename: ${{ steps.getVariables.outputs.coverage_report_json_filename }}
coverage_report_json: ${{ steps.getVariables.outputs.coverage_report_json }} coverage_report_json: ${{ steps.getVariables.outputs.coverage_report_json }}
steps: steps:
@@ -164,11 +144,10 @@ jobs:
from tomli import load as tomli_load from tomli import load as tomli_load
unittestXMLFile = Path("./unittest.xml") htmlDirectory = Path("htmlcov")
coverageHTMLDirectory = Path("htmlcov") xmlFile = Path("./coverage.xml")
coverageXMLFile = Path("./coverage.xml") jsonFile = Path("./coverage.json")
coverageJSONFile = Path("./coverage.json") coverageRC = "${{ inputs.coverage_config }}".strip()
coverageRC = "${{ inputs.coverage_config }}".strip()
# Read output paths from 'pyproject.toml' file # Read output paths from 'pyproject.toml' file
if coverageRC == "pyproject.toml": if coverageRC == "pyproject.toml":
@@ -177,10 +156,9 @@ jobs:
with pyProjectFile.open("rb") as file: with pyProjectFile.open("rb") as file:
pyProjectSettings = tomli_load(file) pyProjectSettings = tomli_load(file)
unittestXMLFile = Path(pyProjectSettings["tool"]["pytest"]["junit_xml"]) htmlDirectory = Path(pyProjectSettings["tool"]["coverage"]["html"]["directory"])
coverageHTMLDirectory = Path(pyProjectSettings["tool"]["coverage"]["html"]["directory"]) xmlFile = Path(pyProjectSettings["tool"]["coverage"]["xml"]["output"])
coverageXMLFile = Path(pyProjectSettings["tool"]["coverage"]["xml"]["output"]) jsonFile = Path(pyProjectSettings["tool"]["coverage"]["json"]["output"])
coverageJSONFile= Path(pyProjectSettings["tool"]["coverage"]["json"]["output"])
else: else:
print(f"File '{pyProjectFile}' not found.") print(f"File '{pyProjectFile}' not found.")
print(f"::error title=FileNotFoundError::File '{pyProjectFile}' not found.") print(f"::error title=FileNotFoundError::File '{pyProjectFile}' not found.")
@@ -193,9 +171,9 @@ jobs:
with coverageRCFile.open("rb") as file: with coverageRCFile.open("rb") as file:
coverageRCSettings = tomli_load(file) coverageRCSettings = tomli_load(file)
coverageHTMLDirectory = Path(coverageRCSettings["html"]["directory"]) htmlDirectory = Path(coverageRCSettings["html"]["directory"])
coverageXMLFile = Path(coverageRCSettings["xml"]["output"]) xmlFile = Path(coverageRCSettings["xml"]["output"])
coverageJSONFile = Path(coverageRCSettings["json"]["output"]) jsonFile = Path(coverageRCSettings["json"]["output"])
else: else:
print(f"File '{coverageRCFile}' not found.") print(f"File '{coverageRCFile}' not found.")
print(f"::error title=FileNotFoundError::File '{coverageRCFile}' not found.") print(f"::error title=FileNotFoundError::File '{coverageRCFile}' not found.")
@@ -206,16 +184,11 @@ jobs:
print(f"GITHUB_OUTPUT: {github_output}") print(f"GITHUB_OUTPUT: {github_output}")
with github_output.open("a+", encoding="utf-8") as f: with github_output.open("a+", encoding="utf-8") as f:
f.write(dedent(f"""\ f.write(dedent(f"""\
unittest_report_xml_directory={unittestXMLFile.parent.as_posix()} coverage_report_html_directory={htmlDirectory.as_posix()}
unittest_report_xml_filename={unittestXMLFile.name} coverage_report_xml_directory={xmlFile.parent.as_posix()}
unittest_report_xml={unittestXMLFile.as_posix()} coverage_report_xml={xmlFile.as_posix()}
coverage_report_html_directory={coverageHTMLDirectory.as_posix()} coverage_report_json_directory={jsonFile.parent.as_posix()}
coverage_report_xml_directory={coverageXMLFile.parent.as_posix()} coverage_report_json={jsonFile.as_posix()}
coverage_report_xml_filename={coverageXMLFile.name}
coverage_report_xml={coverageXMLFile.as_posix()}
coverage_report_json_directory={coverageJSONFile.parent.as_posix()}
coverage_report_json_filename={coverageJSONFile.name}
coverage_report_json={coverageJSONFile.as_posix()}
""")) """))
print(f"DEBUG:\n unittest xml: {unittestXMLFile}\n coverage html: {coverageHTMLDirectory}\n coverage xml: {coverageXMLFile}\n coverage json: {coverageJSONFile}") print(f"DEBUG:\n html={htmlDirectory}\n xml={xmlFile}\n json={jsonFile}")

View File

@@ -55,28 +55,17 @@ jobs:
name: ${{ inputs.latex_artifact }} name: ${{ inputs.latex_artifact }}
path: latex path: latex
- name: Debug - name: Compile LaTeX document
run: | uses: xu-cheng/latex-action@master
tree -pash .
- name: Build LaTeX document using 'pytooling/miktex:sphinx'
uses: addnab/docker-run-action@v3
with: with:
image: pytooling/miktex:sphinx working_directory: latex
options: -v ${{ github.workspace }}/latex:/latex --workdir /latex root_file: ${{ inputs.document }}.tex
run: |
which pdflatex
pwd
ls -lAh
latexmk -xelatex ${{ inputs.document }}.tex
- name: 📤 Upload 'PDF Documentation' artifact - name: 📤 Upload 'PDF Documentation' artifact
uses: pyTooling/upload-artifact@v4 uses: pyTooling/upload-artifact@v4
if: inputs.pdf_artifact != '' if: inputs.pdf_artifact != ''
with: with:
name: ${{ inputs.pdf_artifact }} name: ${{ inputs.pdf_artifact }}
working-directory: latex
path: ${{ inputs.document }}.pdf path: ${{ inputs.document }}.pdf
if-no-files-found: error if-no-files-found: error
retention-days: 1 retention-days: 1

View File

@@ -68,18 +68,6 @@ on:
description: 'Multi-line string containing artifact:file:title asset descriptions.' description: 'Multi-line string containing artifact:file:title asset descriptions.'
required: true required: true
type: string type: string
inventory-json:
type: string
required: false
default: ''
inventory-version:
type: string
required: false
default: ''
inventory-categories:
type: string
required: false
default: ''
tarball-name: tarball-name:
type: string type: string
required: false required: false
@@ -109,23 +97,23 @@ jobs:
run: | run: |
set +e set +e
ANSI_LIGHT_RED=$'\x1b[91m' ANSI_LIGHT_RED="\e[91m"
ANSI_LIGHT_GREEN=$'\x1b[92m' ANSI_LIGHT_GREEN="\e[92m"
ANSI_LIGHT_YELLOW=$'\x1b[93m' ANSI_LIGHT_YELLOW="\e[93m"
ANSI_NOCOLOR=$'\x1b[0m' ANSI_NOCOLOR="\e[0m"
export GH_TOKEN=${{ github.token }} export GH_TOKEN=${{ github.token }}
printf "%s" "Deleting release '${{ inputs.nightly_name }}' ... " echo -n "Deleting release '${{ inputs.nightly_name }}' ... "
message="$(gh release delete ${{ inputs.nightly_name }} --yes 2>&1)" message="$(gh release delete ${{ inputs.nightly_name }} --yes 2>&1)"
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
printf "%s\n" "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
elif [[ "${message}" == "release not found" ]]; then elif [[ "${message}" == "release not found" ]]; then
printf "%s\n" "${ANSI_LIGHT_YELLOW}[NOT FOUND]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_YELLOW}[NOT FOUND]${ANSI_NOCOLOR}"
else else
printf "%s\n" "${ANSI_LIGHT_RED}[FAILED]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_RED}[FAILED]${ANSI_NOCOLOR}"
printf " %s\n" "${ANSI_LIGHT_RED}Couldn't delete release '${{ inputs.nightly_name }}' -> Error: '${message}'.${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_RED}Couldn't delete release '${{ inputs.nightly_name }}' -> Error: '${message}'.${ANSI_NOCOLOR}"
printf "%s\n" "::error title=InternalError::Couldn't delete release '${{ inputs.nightly_name }}' -> Error: '${message}'." echo "::error title=InternalError::Couldn't delete release '${{ inputs.nightly_name }}' -> Error: '${message}'."
exit 1 exit 1
fi fi
@@ -134,19 +122,19 @@ jobs:
run: | run: |
set +e set +e
ANSI_LIGHT_RED=$'\x1b[91m' ANSI_LIGHT_RED="\e[91m"
ANSI_LIGHT_GREEN=$'\x1b[92m' ANSI_LIGHT_GREEN="\e[92m"
ANSI_NOCOLOR=$'\x1b[0m' ANSI_NOCOLOR="\e[0m"
export GH_TOKEN=${{ github.token }} export GH_TOKEN=${{ github.token }}
addDraft="--draft" addDraft="--draft"
if [[ "${{ inputs.prerelease }}" == "true" ]]; then if ${{ inputs.prerelease }}; then
addPreRelease="--prerelease" addPreRelease="--prerelease"
fi fi
if [[ "${{ inputs.latest }}" == "false" ]]; then if ! ${{ inputs.latest }}; then
addLatest="--latest=false" addLatest="--latest=false"
fi fi
@@ -175,17 +163,17 @@ jobs:
cat <<EOF >> __NoTeS__.md cat <<EOF >> __NoTeS__.md
-------- --------
Published from [${{ github.workflow }}](https://github.com/Paebbels/ghdl/actions/runs/${{ github.run_id }}) workflow triggered by @${{ github.actor }} on $(date '+%Y-%m-%d %H:%M:%S %Z'). Published from [${{ github.workflow }}](https://github.com/Paebbels/ghdl/actions/runs/${{ github.run_id }}) workflow triggered by @${{ github.actor }} on $(date '+%Y-%m-%d %H:%M:%S').
EOF EOF
printf "%s\n" "Creating release '${{ inputs.nightly_name }}' ... " echo "Creating release '${{ inputs.nightly_name }}' ... "
message="$(gh release create "${{ inputs.nightly_name }}" --verify-tag $addDraft $addPreRelease $addLatest "${addTitle[@]}" "${addNotes[@]}" 2>&1)" message="$(gh release create "${{ inputs.nightly_name }}" --verify-tag $addDraft $addPreRelease $addLatest "${addTitle[@]}" "${addNotes[@]}" 2>&1)"
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
printf "%s\n" "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
else else
printf "%s\n" "${ANSI_LIGHT_RED}[FAILED]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_RED}[FAILED]${ANSI_NOCOLOR}"
printf " %s\n" "${ANSI_LIGHT_RED}Couldn't create release '${{ inputs.nightly_name }}' -> Error: '${message}'.${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_RED}Couldn't create release '${{ inputs.nightly_name }}' -> Error: '${message}'.${ANSI_NOCOLOR}"
printf "%s\n" "::error title=InternalError::Couldn't create release '${{ inputs.nightly_name }}' -> Error: '${message}'." echo "::error title=InternalError::Couldn't create release '${{ inputs.nightly_name }}' -> Error: '${message}'."
exit 1 exit 1
fi fi
@@ -194,11 +182,10 @@ jobs:
run: | run: |
set +e set +e
ANSI_LIGHT_RED=$'\x1b[91m' ANSI_LIGHT_RED="\e[91m"
ANSI_LIGHT_GREEN=$'\x1b[92m' ANSI_LIGHT_GREEN="\e[92m"
ANSI_LIGHT_YELLOW=$'\x1b[93m' ANSI_LIGHT_YELLOW="\e[93m"
ANSI_LIGHT_BLUE=$'\x1b[94m' ANSI_NOCOLOR="\e[0m"
ANSI_NOCOLOR=$'\x1b[0m'
export GH_TOKEN=${{ github.token }} export GH_TOKEN=${{ github.token }}
@@ -212,42 +199,9 @@ jobs:
replacement="${patternLine#*=}" replacement="${patternLine#*=}"
line="${line//"%$pattern%"/"$replacement"}" line="${line//"%$pattern%"/"$replacement"}"
done <<<'${{ inputs.replacements }}' done <<<'${{ inputs.replacements }}'
printf "%s\n" "$line" echo "$line"
} }
# Create JSON inventory
if [[ "${{ inputs.inventory-json }}" != "" ]]; then
VERSION="1.0"
# Split categories by ',' into a Bash array.
# See https://stackoverflow.com/a/45201229/3719459
if [[ "${{ inputs.inventory-categories }}" != "" ]]; then
readarray -td, inventoryCategories <<<"${{ inputs.inventory-categories }},"
unset 'inventoryCategories[-1]'
declare -p inventoryCategories
else
inventoryCategories=""
fi
jsonInventory=$(jq -c -n \
--arg version "${VERSION}" \
--arg date "$(date +"%Y-%m-%dT%H-%M-%S%:z")" \
--argjson jsonMeta "$(jq -c -n \
--arg tag "${{ inputs.nightly_name }}" \
--arg version "${{ inputs.inventory-version }}" \
--arg hash "${{ github.sha }}" \
--arg repo "${{ github.server_url }}/${{ github.repository }}" \
--arg release "${{ github.server_url }}/${{ github.repository }}/releases/download/${{ inputs.nightly_name }}" \
--argjson categories "$(jq -c -n \
'$ARGS.positional' \
--args "${inventoryCategories[@]}" \
)" \
'{"tag": $tag, "version": $version, "git-hash": $hash, "repository-url": $repo, "release-url": $release, "categories": $categories}' \
)" \
'{"version": 1.0, "timestamp": $date, "meta": $jsonMeta, "files": {}}'
)
fi
ERRORS=0 ERRORS=0
# A dictionary of 0/1 to avoid duplicate downloads # A dictionary of 0/1 to avoid duplicate downloads
declare -A downloadedArtifacts declare -A downloadedArtifacts
@@ -260,245 +214,184 @@ jobs:
# split assetLine colon separated triple: artifact:asset:title # split assetLine colon separated triple: artifact:asset:title
artifact="${assetLine%%:*}" artifact="${assetLine%%:*}"
assetLine="${assetLine#*:}" remaining="${assetLine#*:}"
asset="${assetLine%%:*}" asset="${remaining%%:*}"
assetLine="${assetLine#*:}" title="${remaining##*:}"
if [[ "${{ inputs.inventory-json }}" == "" ]]; then
categories=""
title="${assetLine##*:}"
else
categories="${assetLine%%:*}"
title="${assetLine##*:}"
fi
# remove leading whitespace # remove leading whitespace
asset="${asset#"${asset%%[![:space:]]*}"}" asset="${asset#"${asset%%[![:space:]]*}"}"
categories="${categories#"${categories%%[![:space:]]*}"}"
title="${title#"${title%%[![:space:]]*}"}" title="${title#"${title%%[![:space:]]*}"}"
# apply replacements # apply replacements
asset="$(Replace "${asset}")" asset="$(Replace "${asset}")"
title="$(Replace "${title}")" title="$(Replace "${title}")"
printf "%s\n" "Publish asset '${asset}' from artifact '${artifact}' with title '${title}'" echo "Publish asset '${asset}' from artifact '${artifact}' with title '${title}'"
printf " %s" "Checked asset for duplicates ... " echo -n " Checked asset for duplicates ... "
if [[ -n "${assetFilenames[$asset]}" ]]; then if [[ -n "${assetFilenames[$asset]}" ]]; then
printf "%s\n" "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}"
printf "%s\n" "::error title=DuplicateAsset::Asset '${asset}' from artifact '${artifact}' was already uploaded to release '${{ inputs.nightly_name }}'." echo "::error title=DuplicateAsset::Asset '${asset}' from artifact '${artifact}' was already uploaded to release '${{ inputs.nightly_name }}'."
ERRORS=$((ERRORS + 1)) ERRORS=1
continue continue
else else
printf "%s\n" "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
assetFilenames[$asset]=1 assetFilenames[$asset]=1
fi fi
# Download artifact by artifact name # Download artifact by artifact name
if [[ -n "${downloadedArtifacts[$artifact]}" ]]; then if [[ -n "${downloadedArtifacts[$artifact]}" ]]; then
printf " %s\n" "downloading '${artifact}' ... ${ANSI_LIGHT_YELLOW}[SKIPPED]${ANSI_NOCOLOR}" echo -e " downloading '${artifact}' ... ${ANSI_LIGHT_YELLOW}[SKIPPED]${ANSI_NOCOLOR}"
else else
echo " downloading '${artifact}' ... " echo " downloading '${artifact}' ... "
printf " %s" "gh run download $GITHUB_RUN_ID --dir \"${artifact}\" --name \"${artifact}\" " echo -n " gh run download $GITHUB_RUN_ID --dir \"${artifact}\" --name \"${artifact}\" "
gh run download $GITHUB_RUN_ID --dir "${artifact}" --name "${artifact}" gh run download $GITHUB_RUN_ID --dir "${artifact}" --name "${artifact}"
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
printf "%s\n" "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
else else
printf "%s\n" "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}"
printf " %s\n" "${ANSI_LIGHT_RED}Couldn't download artifact '${artifact}'.${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_RED}Couldn't download artifact '${artifact}'.${ANSI_NOCOLOR}"
printf "%s\n" "::error title=ArtifactNotFound::Couldn't download artifact '${artifact}'." echo "::error title=ArtifactNotFound::Couldn't download artifact '${artifact}'."
ERRORS=$((ERRORS + 1)) ERRORS=1
continue continue
fi fi
downloadedArtifacts[$artifact]=1 downloadedArtifacts[$artifact]=1
printf " %s" "Checking for embedded tarball ... " echo -n " Checking for embedded tarball ... "
if [[ -f "${artifact}/${{ inputs.tarball-name }}" ]]; then if [[ -f "${artifact}/${{ inputs.tarball-name }}" ]]; then
printf "%s\n" "${ANSI_LIGHT_GREEN}[FOUND]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_GREEN}[FOUND]${ANSI_NOCOLOR}"
pushd "${artifact}" > /dev/null pushd "${artifact}" > /dev/null
printf " %s" "Extracting embedded tarball ... " echo -n " Extracting embedded tarball ... "
tar -xf "${{ inputs.tarball-name }}" tar -xf "${{ inputs.tarball-name }}"
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
printf "%s\n" "${ANSI_LIGHT_RED}[FAILED]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_RED}[FAILED]${ANSI_NOCOLOR}"
else else
printf "%s\n" "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
fi fi
printf " %s" "Removing temporary tarball ... " echo -n " Removing temporary tarball ... "
rm -f "${{ inputs.tarball-name }}" rm -f "${{ inputs.tarball-name }}"
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
printf "%s\n" "${ANSI_LIGHT_RED}[FAILED]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_RED}[FAILED]${ANSI_NOCOLOR}"
else else
printf "%s\n" "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
fi fi
popd > /dev/null popd > /dev/null
else else
printf "%s\n" "${ANSI_LIGHT_YELLOW}[SKIPPED]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_YELLOW}[SKIPPED]${ANSI_NOCOLOR}"
fi fi
fi fi
# Check if artifact should be compressed (zip, tgz) or if asset was part of the downloaded artifact. # Check if artifact should be compressed (zip, tgz) or if asset was part of the downloaded artifact.
printf " %s" "checking asset '${artifact}/${asset}' ... " echo -n " checking asset '${artifact}/${asset}' ... "
if [[ "${asset}" == !*.zip ]]; then if [[ "${asset}" == !*.zip ]]; then
printf "%s\n" "${ANSI_LIGHT_GREEN}[ZIP]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_GREEN}[ZIP]${ANSI_NOCOLOR}"
asset="${asset##*!}" asset="${asset##*!}"
printf "::group:: %s\n" "Compressing artifact '${artifact}' to '${asset}' ..." echo " Compressing artifact '${artifact}' to '${asset}' ..."
( (
cd "${artifact}" && \ cd "${artifact}" && \
zip -r "../${asset}" * zip -r "../${asset}" *
) )
retCode=$? if [[ $? -eq 0 ]]; then
printf "::endgroup::\n" echo -e " Compression ${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
if [[ $retCode -eq 0 ]]; then
printf " %s\n" "Compression ${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
uploadFile="${asset}" uploadFile="${asset}"
else else
printf " %s\n" "Compression ${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}" echo -e " Compression ${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}"
printf " %s\n" "${ANSI_LIGHT_RED}Couldn't compress '${artifact}' to zip file '${asset}'.${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_RED}Couldn't compress '${artifact}' to zip file '${asset}'.${ANSI_NOCOLOR}"
printf "%s\n" "::error title=CompressionError::Couldn't compress '${artifact}' to zip file '${asset}'." echo "::error title=CompressionError::Couldn't compress '${artifact}' to zip file '${asset}'."
ERRORS=$((ERRORS + 1)) ERRORS=1
continue continue
fi fi
elif [[ "${asset}" == !*.tgz || "${asset}" == !*.tar.gz || "${asset}" == \$*.tgz || "${asset}" == \$*.tar.gz ]]; then elif [[ "${asset}" == !*.tgz || "${asset}" == !*.tar.gz || "${asset}" == \$*.tgz || "${asset}" == \$*.tar.gz ]]; then
printf "%s\n" "${ANSI_LIGHT_GREEN}[TAR/GZ]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_GREEN}[TAR/GZ]${ANSI_NOCOLOR}"
if [[ "${asset:0:1}" == "\$" ]]; then if [[ "${asset:0:1}" == "\$" ]]; then
asset="${asset##*$}" asset="${asset##*$}"
dirName="${asset%.*}" dirName="${asset%.*}"
printf " %s\n" "Compressing artifact '${artifact}' to '${asset}' ..." echo " Compressing artifact '${artifact}' to '${asset}' ..."
tar -c --gzip --owner=0 --group=0 --file="${asset}" --directory="${artifact}" --transform "s|^\.|${dirName%.tar}|" . tar -c --gzip --file="${asset}" --directory="${artifact}" --transform "s|^\.|${dirName%.tar}|" .
retCode=$? retCode=$?
else else
asset="${asset##*!}" asset="${asset##*!}"
printf " %s\n" "Compressing artifact '${artifact}' to '${asset}' ..." echo " Compressing artifact '${artifact}' to '${asset}' ..."
( (
cd "${artifact}" && \ cd "${artifact}" && \
tar -c --gzip --owner=0 --group=0 --file="../${asset}" * tar -c --gzip --file="../${asset}" *
) )
retCode=$? retCode=$?
fi fi
if [[ $retCode -eq 0 ]]; then if [[ $retCode -eq 0 ]]; then
printf " %s\n" "Compression ${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" echo -e " Compression ${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
uploadFile="${asset}" uploadFile="${asset}"
else else
printf " %s\n" "Compression ${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}" echo -e " Compression ${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}"
printf " %s\n" "${ANSI_LIGHT_RED}Couldn't compress '${artifact}' to tgz file '${asset}'.${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_RED}Couldn't compress '${artifact}' to tgz file '${asset}'.${ANSI_NOCOLOR}"
printf "%s\n" "::error title=CompressionError::Couldn't compress '${artifact}' to tgz file '${asset}'." echo "::error title=CompressionError::Couldn't compress '${artifact}' to tgz file '${asset}'."
ERRORS=$((ERRORS + 1)) ERRORS=1
continue continue
fi fi
elif [[ "${asset}" == !*.tzst || "${asset}" == !*.tar.zst || "${asset}" == \$*.tzst || "${asset}" == \$*.tar.zst ]]; then elif [[ "${asset}" == !*.tzst || "${asset}" == !*.tar.zst || "${asset}" == \$*.tzst || "${asset}" == \$*.tar.zst ]]; then
printf "%s\n" "${ANSI_LIGHT_GREEN}[ZST]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_GREEN}[ZST]${ANSI_NOCOLOR}"
if [[ "${asset:0:1}" == "\$" ]]; then if [[ "${asset:0:1}" == "\$" ]]; then
asset="${asset##*$}" asset="${asset##*$}"
dirName="${asset%.*}" dirName="${asset%.*}"
printf " %s\n" "Compressing artifact '${artifact}' to '${asset}' ..." echo " Compressing artifact '${artifact}' to '${asset}' ..."
tar -c --zstd --owner=0 --group=0 --file="${asset}" --directory="${artifact}" --transform "s|^\.|${dirName%.tar}|" . tar -c --zstd --file="${asset}" --directory="${artifact}" --transform "s|^\.|${dirName%.tar}|" .
retCode=$? retCode=$?
else else
asset="${asset##*!}" asset="${asset##*!}"
printf " %s\n" "Compressing artifact '${artifact}' to '${asset}' ..." echo " Compressing artifact '${artifact}' to '${asset}' ..."
( (
cd "${artifact}" && \ cd "${artifact}" && \
tar -c --zstd --owner=0 --group=0 --file="../${asset}" * tar -c --zstd --file="../${asset}" *
) )
retCode=$? retCode=$?
fi fi
if [[ $retCode -eq 0 ]]; then if [[ $retCode -eq 0 ]]; then
printf " %s\n" "Compression ${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" echo -e " Compression ${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
uploadFile="${asset}" uploadFile="${asset}"
else else
printf " %s\n" "Compression ${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}" echo -e " Compression ${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}"
printf " %s\n" "${ANSI_LIGHT_RED}Couldn't compress '${artifact}' to zst file '${asset}'.${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_RED}Couldn't compress '${artifact}' to zst file '${asset}'.${ANSI_NOCOLOR}"
printf "%s\n" "::error title=CompressionError::Couldn't compress '${artifact}' to zst file '${asset}'." echo "::error title=CompressionError::Couldn't compress '${artifact}' to zst file '${asset}'."
ERRORS=$((ERRORS + 1)) ERRORS=1
continue continue
fi fi
elif [[ -e "${artifact}/${asset}" ]]; then elif [[ -e "${artifact}/${asset}" ]]; then
printf "%s\n" "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
uploadFile="${artifact}/${asset}" uploadFile="${artifact}/${asset}"
else else
printf "%s\n" "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}"
printf " %s\n" "${ANSI_LIGHT_RED}Couldn't find asset '${asset}' in artifact '${artifact}'.${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_RED}Couldn't find asset '${asset}' in artifact '${artifact}'.${ANSI_NOCOLOR}"
printf "%s\n" "::error title=FileNotFound::Couldn't find asset '${asset}' in artifact '${artifact}'." echo "::error title=FileNotFound::Couldn't find asset '${asset}' in artifact '${artifact}'."
ERRORS=$((ERRORS + 1)) ERRORS=1
continue continue
fi fi
# Add asset to JSON inventory
if [[ "${{ inputs.inventory-json }}" != "" ]]; then
if [[ "${categories}" != "${title}" ]]; then
printf " %s\n" "adding file '${uploadFile#*/}' with '${categories//;/ → }' to JSON inventory ..."
category=""
jsonEntry=$(jq -c -n \
--arg title "${title}" \
--arg file "${uploadFile#*/}" \
'{"file": $file, "title": $title}' \
)
while [[ "${categories}" != "${category}" ]]; do
category="${categories##*,}"
categories="${categories%,*}"
jsonEntry=$(jq -c -n --arg cat "${category}" --argjson value "${jsonEntry}" '{$cat: $value}')
done
jsonInventory=$(jq -c -n \
--argjson inventory "${jsonInventory}" \
--argjson file "${jsonEntry}" \
'$inventory * {"files": $file}' \
)
else
printf " %s\n" "adding file '${uploadFile#*/}' to JSON inventory ... ${ANSI_LIGHT_YELLOW}[SKIPPED]${ANSI_NOCOLOR}"
fi
fi
# Upload asset to existing release page # Upload asset to existing release page
printf " %s" "uploading asset '${asset}' from '${uploadFile}' with title '${title}' ... " echo -n " uploading asset '${asset}' from '${uploadFile}' with title '${title}' ... "
gh release upload ${{ inputs.nightly_name }} "${uploadFile}#${title}" --clobber gh release upload ${{ inputs.nightly_name }} "${uploadFile}#${title}" --clobber
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
printf "%s\n" "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
else else
printf "%s\n" "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}"
printf " %s\n" "${ANSI_LIGHT_RED}Couldn't upload asset '${asset}' from '${uploadFile}' to release '${{ inputs.nightly_name }}'.${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_RED}Couldn't upload asset '${asset}' from '${uploadFile}' to release '${{ inputs.nightly_name }}'.${ANSI_NOCOLOR}"
printf "%s\n" "::error title=UploadError::Couldn't upload asset '${asset}' from '${uploadFile}' to release '${{ inputs.nightly_name }}'." echo "::error title=UploadError::Couldn't upload asset '${asset}' from '${uploadFile}' to release '${{ inputs.nightly_name }}'."
ERRORS=$((ERRORS + 1)) ERRORS=1
continue continue
fi fi
done <<<'${{ inputs.assets }}' done <<<'${{ inputs.assets }}'
if [[ "${{ inputs.inventory-json }}" != "" ]]; then echo "Inspecting downloaded artifacts ..."
inventoryTitle="Release Inventory (JSON)" tree -L 3 .
printf "%s\n" "Publish asset '${{ inputs.inventory-json }}' with title '${inventoryTitle}'" if [[ $ERROR -ne 0 ]]; then
printf "::group::${ANSI_LIGHT_BLUE}%s${ANSI_NOCOLOR}\n" "Writing JSON inventory to '${{ inputs.inventory-json }}' ...." echo -e "${ANSI_LIGHT_RED}Errors detected in previous steps.${ANSI_NOCOLOR}"
printf "%s\n" "$(jq -n --argjson inventory "${jsonInventory}" '$inventory')" > "${{ inputs.inventory-json }}"
cat "${{ inputs.inventory-json }}"
printf "::endgroup::\n"
# Upload inventory asset to existing release page
printf " %s" "uploading asset '${{ inputs.inventory-json }}' title '${inventoryTitle}' ... "
gh release upload ${{ inputs.nightly_name }} "${{ inputs.inventory-json }}#${inventoryTitle}" --clobber
if [[ $? -eq 0 ]]; then
printf "%s\n" "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
else
printf "%s\n" "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}"
printf " %s\n" "${ANSI_LIGHT_RED}Couldn't upload asset '${{ inputs.inventory-json }}' to release '${{ inputs.nightly_name }}'.${ANSI_NOCOLOR}"
printf "%s\n" "::error title=UploadError::Couldn't upload asset '${{ inputs.inventory-json }}' to release '${{ inputs.nightly_name }}'."
ERRORS=$((ERRORS + 1))
continue
fi
fi
printf "::group::${ANSI_LIGHT_BLUE}%s${ANSI_NOCOLOR}\n" "Inspecting downloaded artifacts ..."
tree -pash -L 3 .
printf "::endgroup::\n"
if [[ $ERRORS -ne 0 ]]; then
printf "%s\n" "${ANSI_LIGHT_RED}${ERRORS} errors detected in previous steps.${ANSI_NOCOLOR}"
exit 1 exit 1
fi fi
@@ -507,19 +400,19 @@ jobs:
run: | run: |
set +e set +e
ANSI_LIGHT_RED=$'\x1b[91m' ANSI_LIGHT_RED="\e[91m"
ANSI_LIGHT_GREEN=$'\x1b[92m' ANSI_LIGHT_GREEN="\e[92m"
ANSI_NOCOLOR=$'\x1b[0m' ANSI_NOCOLOR="\e[0m"
export GH_TOKEN=${{ github.token }} export GH_TOKEN=${{ github.token }}
# Remove draft-state from release page # Remove draft-state from release page
printf "%s" "Remove draft-state from release '${title}' ... " echo -n "Remove draft-state from release '${title}' ... "
gh release edit --draft=false "${{ inputs.nightly_name }}" gh release edit --draft=false "${{ inputs.nightly_name }}"
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
printf "%s\n" "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
else else
printf "%s\n" "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}"
printf " %s\n" "${ANSI_LIGHT_RED}Couldn't remove draft-state from release '${{ inputs.nightly_name }}'.${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_RED}Couldn't remove draft-state from release '${{ inputs.nightly_name }}'.${ANSI_NOCOLOR}"
printf "%s\n" "::error title=ReleasePage::Couldn't remove draft-state from release '${{ inputs.nightly_name }}'." echo "::error title=ReleasePage::Couldn't remove draft-state from release '${{ inputs.nightly_name }}'."
fi fi

View File

@@ -147,7 +147,7 @@ jobs:
else: else:
name = f"{package_namespace}.{package_name}" name = f"{package_namespace}.{package_name}"
currentMSYS2Version = "3.12" currentMSYS2Version = "3.11"
currentAlphaVersion = "3.14" currentAlphaVersion = "3.14"
currentAlphaRelease = "3.14.0-alpha.1" currentAlphaRelease = "3.14.0-alpha.1"
@@ -197,10 +197,9 @@ jobs:
"3.13": { "icon": "🟢", "until": "2029.10" }, "3.13": { "icon": "🟢", "until": "2029.10" },
"3.14": { "icon": "🟣", "until": "2030.10" }, "3.14": { "icon": "🟣", "until": "2030.10" },
"pypy-3.7": { "icon": "⟲⚫", "until": "????.??" }, "pypy-3.7": { "icon": "⟲⚫", "until": "????.??" },
"pypy-3.8": { "icon": "⟲", "until": "????.??" }, "pypy-3.8": { "icon": "⟲🔴", "until": "????.??" },
"pypy-3.9": { "icon": "⟲🔴", "until": "????.??" }, "pypy-3.9": { "icon": "⟲🟠", "until": "????.??" },
"pypy-3.10": { "icon": "⟲🟠", "until": "????.??" }, "pypy-3.10": { "icon": "⟲🟡", "until": "????.??" },
"pypy-3.11": { "icon": "⟲🟡", "until": "????.??" },
}, },
# Runner systems (runner images) supported by GitHub Actions # Runner systems (runner images) supported by GitHub Actions
"sys": { "sys": {
@@ -338,7 +337,7 @@ jobs:
- name: Verify out parameters - name: Verify out parameters
id: verify id: verify
run: | run: |
printf "python_version: %s\n" '${{ steps.params.outputs.python_version }}' echo 'python_version: ${{ steps.params.outputs.python_version }}'
printf "python_jobs: %s\n" '${{ steps.params.outputs.python_jobs }}' echo 'python_jobs: ${{ steps.params.outputs.python_jobs }}'
printf "artifact_names: %s\n" '${{ steps.params.outputs.artifact_names }}' echo 'artifact_names: ${{ steps.params.outputs.artifact_names }}'
printf "params: %s\n" '${{ steps.params.outputs.params }}' echo 'params: ${{ steps.params.outputs.params }}'

View File

@@ -31,7 +31,7 @@ on:
type: string type: string
coverage_artifacts_pattern: coverage_artifacts_pattern:
required: false required: false
default: '*-CodeCoverage-SQLite-*' default: '*-CodeCoverage-*'
type: string type: string
coverage_config: coverage_config:
description: 'Path to the .coveragerc file. Use pyproject.toml by default.' description: 'Path to the .coveragerc file. Use pyproject.toml by default.'
@@ -76,7 +76,7 @@ jobs:
lfs: true lfs: true
submodules: true submodules: true
- name: 📥 Download Artifacts - name: Download Artifacts
uses: pyTooling/download-artifact@v4 uses: pyTooling/download-artifact@v4
with: with:
pattern: ${{ inputs.coverage_artifacts_pattern }} pattern: ${{ inputs.coverage_artifacts_pattern }}
@@ -84,7 +84,7 @@ jobs:
- name: 🔎 Inspect extracted artifact (tarball) - name: 🔎 Inspect extracted artifact (tarball)
run: | run: |
tree -pash artifacts tree -psh artifacts
- name: 🔧 Install coverage and tomli - name: 🔧 Install coverage and tomli
run: | run: |
@@ -150,11 +150,13 @@ jobs:
print(f"DEBUG:\n html={htmlDirectory}\n xml={xmlFile}\n json={jsonFile}") print(f"DEBUG:\n html={htmlDirectory}\n xml={xmlFile}\n json={jsonFile}")
- name: Rename .coverage files and move them all into 'coverage/' - name: Rename .coverage files and collect them all to coverage/
run: | run: |
ls -lAh artifacts/
ls -lAh artifacts/*/.coverage
mkdir -p coverage mkdir -p coverage
find artifacts/ -type f -path "*SQLite*.coverage" -exec sh -c 'cp -v $0 "coverage/$(basename $0).$(basename $(dirname $0))"' {} ';' find artifacts/ -type f -path "*SQLite*.coverage" -exec sh -c 'cp -v $0 "coverage/$(basename $0).$(basename $(dirname $0))"' {} ';'
tree -pash coverage tree -a coverage
- name: Combine SQLite files (using Coverage.py) - name: Combine SQLite files (using Coverage.py)
run: coverage combine --data-file=.coverage coverage/ run: coverage combine --data-file=.coverage coverage/
@@ -175,12 +177,12 @@ jobs:
run: | run: |
coverage html --data-file=.coverage -d report/coverage/html coverage html --data-file=.coverage -d report/coverage/html
rm report/coverage/html/.gitignore rm report/coverage/html/.gitignore
tree -pash report/coverage/html tree -a report/coverage/html
- name: 📤 Upload 'Coverage SQLite Database' artifact - name: 📤 Upload 'Coverage SQLite Database' artifact
uses: pyTooling/upload-artifact@v4
if: inputs.coverage_sqlite_artifact != '' if: inputs.coverage_sqlite_artifact != ''
continue-on-error: true continue-on-error: true
uses: pyTooling/upload-artifact@v4
with: with:
name: ${{ inputs.coverage_sqlite_artifact }} name: ${{ inputs.coverage_sqlite_artifact }}
path: .coverage path: .coverage
@@ -188,9 +190,9 @@ jobs:
retention-days: 1 retention-days: 1
- name: 📤 Upload 'Coverage XML Report' artifact - name: 📤 Upload 'Coverage XML Report' artifact
uses: pyTooling/upload-artifact@v4
if: inputs.coverage_xml_artifact != '' if: inputs.coverage_xml_artifact != ''
continue-on-error: true continue-on-error: true
uses: pyTooling/upload-artifact@v4
with: with:
name: ${{ inputs.coverage_xml_artifact }} name: ${{ inputs.coverage_xml_artifact }}
path: ${{ steps.getVariables.outputs.coverage_report_xml }} path: ${{ steps.getVariables.outputs.coverage_report_xml }}
@@ -198,9 +200,9 @@ jobs:
retention-days: 1 retention-days: 1
- name: 📤 Upload 'Coverage JSON Report' artifact - name: 📤 Upload 'Coverage JSON Report' artifact
uses: pyTooling/upload-artifact@v4
if: inputs.coverage_json_artifact != '' if: inputs.coverage_json_artifact != ''
continue-on-error: true continue-on-error: true
uses: pyTooling/upload-artifact@v4
with: with:
name: ${{ inputs.coverage_json_artifact }} name: ${{ inputs.coverage_json_artifact }}
path: ${{ steps.getVariables.outputs.coverage_report_json }} path: ${{ steps.getVariables.outputs.coverage_report_json }}
@@ -208,9 +210,9 @@ jobs:
retention-days: 1 retention-days: 1
- name: 📤 Upload 'Coverage HTML Report' artifact - name: 📤 Upload 'Coverage HTML Report' artifact
uses: pyTooling/upload-artifact@v4
if: inputs.coverage_html_artifact != '' if: inputs.coverage_html_artifact != ''
continue-on-error: true continue-on-error: true
uses: pyTooling/upload-artifact@v4
with: with:
name: ${{ inputs.coverage_html_artifact }} name: ${{ inputs.coverage_html_artifact }}
working-directory: ${{ steps.getVariables.outputs.coverage_report_html_directory }} working-directory: ${{ steps.getVariables.outputs.coverage_report_html_directory }}
@@ -219,18 +221,18 @@ jobs:
retention-days: 1 retention-days: 1
- name: 📊 Publish code coverage at CodeCov - name: 📊 Publish code coverage at CodeCov
uses: codecov/codecov-action@v5
if: inputs.CodeCov == true if: inputs.CodeCov == true
continue-on-error: true continue-on-error: true
uses: codecov/codecov-action@v5
with: with:
files: ${{ steps.getVariables.outputs.coverage_report_xml }} files: ${{ steps.getVariables.outputs.coverage_report_xml }}
flags: unittests flags: unittests
env_vars: PYTHON env_vars: PYTHON
- name: 📉 Publish code coverage at Codacy - name: 📉 Publish code coverage at Codacy
uses: codacy/codacy-coverage-reporter-action@v1
if: inputs.Codacy == true if: inputs.Codacy == true
continue-on-error: true continue-on-error: true
uses: codacy/codacy-coverage-reporter-action@v1
with: with:
project-token: ${{ secrets.codacy_token }} project-token: ${{ secrets.codacy_token }}
coverage-reports: ${{ steps.getVariables.outputs.coverage_report_xml }} coverage-reports: ${{ steps.getVariables.outputs.coverage_report_xml }}

View File

@@ -32,7 +32,7 @@ on:
type: string type: string
unittest_artifacts_pattern: unittest_artifacts_pattern:
required: false required: false
default: '*-UnitTestReportSummary-XML-*' default: '*-UnitTestReportSummary-*'
type: string type: string
merged_junit_artifact: merged_junit_artifact:
description: 'Name of the merged JUnit Test Summary artifact.' description: 'Name of the merged JUnit Test Summary artifact.'
@@ -65,7 +65,7 @@ jobs:
- name: ⏬ Checkout repository - name: ⏬ Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: 📥 Download Artifacts - name: Download Artifacts
uses: pyTooling/download-artifact@v4 uses: pyTooling/download-artifact@v4
with: with:
pattern: ${{ inputs.unittest_artifacts_pattern }} pattern: ${{ inputs.unittest_artifacts_pattern }}
@@ -73,22 +73,23 @@ jobs:
- name: 🔎 Inspect extracted artifact (tarball) - name: 🔎 Inspect extracted artifact (tarball)
run: | run: |
tree -pash artifacts tree -psh artifacts
- name: 🔧 Install pyEDAA.Reports (JUunit Parser and Merger) - name: 🔧 Install pyEDAA.Reports (JUunit Parser and Merger)
run: | run: |
python -m pip install --disable-pip-version-check --break-system-packages -U pyEDAA.Reports python -m pip install --disable-pip-version-check --break-system-packages -U pyEDAA.Reports
- name: Rename JUnit files and move them all into 'junit/' - name: Move JUnit files and collect them all to junit/
run: | run: |
mkdir -p junit mkdir -p junit
find artifacts/ -type f -path "*.xml" -exec sh -c 'cp -v $0 "junit/$(basename $(dirname $0)).$(basename $0)"' {} ';' ls -lAh artifacts/*/*.xml
tree -pash junit find artifacts/ -type f -path "*TestReportSummary*.xml" -exec sh -c 'cp -v $0 "junit/$(basename $(dirname $0)).$(basename $0)"' {} ';'
tree -a junit
- name: 🔁 Merge JUnit Unit Test Summaries - name: 🔁 Merge JUnit Unit Test Summaries
run: | run: |
pyedaa-reports -v unittest "--merge=pyTest-JUnit:junit/*.xml" ${{ inputs.additional_merge_args }} "--output=pyTest-JUnit:Unittesting.xml" pyedaa-reports -v unittest "--merge=pyTest-JUnit:junit/*.xml" ${{ inputs.additional_merge_args }} "--output=pyTest-JUnit:Unittesting.xml"
printf "%s\n" "cat Unittesting.xml" echo "cat Unittesting.xml"
cat Unittesting.xml cat Unittesting.xml
- name: 📊 Publish Unit Test Results - name: 📊 Publish Unit Test Results
@@ -100,8 +101,8 @@ jobs:
reporter: java-junit reporter: java-junit
- name: 📤 Upload merged 'JUnit Test Summary' artifact - name: 📤 Upload merged 'JUnit Test Summary' artifact
uses: pyTooling/upload-artifact@v4
if: inputs.merged_junit_artifact != '' if: inputs.merged_junit_artifact != ''
uses: pyTooling/upload-artifact@v4
with: with:
name: ${{ inputs.merged_junit_artifact }} name: ${{ inputs.merged_junit_artifact }}
path: Unittesting.xml path: Unittesting.xml

View File

@@ -55,22 +55,22 @@ jobs:
- name: ⏬ Checkout repository - name: ⏬ Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: 📥 Download artifacts '${{ inputs.doc }}' from 'SphinxDocumentation' job - name: 📥 Download artifacts '${{ inputs.doc }}' from 'BuildTheDocs' job
uses: pyTooling/download-artifact@v4 uses: pyTooling/download-artifact@v4
with: with:
name: ${{ inputs.doc }} name: ${{ inputs.doc }}
path: public path: public
- name: 📥 Download artifacts '${{ inputs.coverage }}' from 'Coverage' job - name: 📥 Download artifacts '${{ inputs.coverage }}' from 'Coverage' job
uses: pyTooling/download-artifact@v4
if: ${{ inputs.coverage != '' }} if: ${{ inputs.coverage != '' }}
uses: pyTooling/download-artifact@v4
with: with:
name: ${{ inputs.coverage }} name: ${{ inputs.coverage }}
path: public/coverage path: public/coverage
- name: 📥 Download artifacts '${{ inputs.typing }}' from 'StaticTypeCheck' job - name: 📥 Download artifacts '${{ inputs.typing }}' from 'StaticTypeCheck' job
uses: pyTooling/download-artifact@v4
if: ${{ inputs.typing != '' }} if: ${{ inputs.typing != '' }}
uses: pyTooling/download-artifact@v4
with: with:
name: ${{ inputs.typing }} name: ${{ inputs.typing }}
path: public/typing path: public/typing

View File

@@ -49,8 +49,8 @@ jobs:
echo "datetime=${RELEASE_DATETIME}" >> $GITHUB_OUTPUT echo "datetime=${RELEASE_DATETIME}" >> $GITHUB_OUTPUT
- name: 📑 Create Release Page - name: 📑 Create Release Page
uses: actions/create-release@v1
id: createReleasePage id: createReleasePage
uses: actions/create-release@v1
env: env:
GITHUB_TOKEN: ${{ github.token }} GITHUB_TOKEN: ${{ github.token }}
with: with:

View File

@@ -100,15 +100,15 @@ jobs:
python -m pip install --disable-pip-version-check ${{ inputs.requirements }} python -m pip install --disable-pip-version-check ${{ inputs.requirements }}
- name: 📥 Download artifacts '${{ inputs.unittest_xml_artifact }}' from 'Unittesting' job - name: 📥 Download artifacts '${{ inputs.unittest_xml_artifact }}' from 'Unittesting' job
uses: pyTooling/download-artifact@v4
if: inputs.unittest_xml_artifact != '' if: inputs.unittest_xml_artifact != ''
uses: pyTooling/download-artifact@v4
with: with:
name: ${{ inputs.unittest_xml_artifact }} name: ${{ inputs.unittest_xml_artifact }}
path: ${{ inputs.unittest_xml_directory }} path: ${{ inputs.unittest_xml_directory }}
- name: 📥 Download artifacts '${{ inputs.coverage_json_artifact }}' from 'PublishCoverageResults' job - name: 📥 Download artifacts '${{ inputs.coverage_json_artifact }}' from 'PublishCoverageResults' job
uses: pyTooling/download-artifact@v4
if: inputs.coverage_json_artifact != '' if: inputs.coverage_json_artifact != ''
uses: pyTooling/download-artifact@v4
with: with:
name: ${{ inputs.coverage_json_artifact }} name: ${{ inputs.coverage_json_artifact }}
path: ${{ inputs.coverage_report_json_directory }} path: ${{ inputs.coverage_report_json_directory }}
@@ -122,9 +122,9 @@ jobs:
sphinx-build -v -n -b html -d _build/doctrees -j $(nproc) -w _build/html.log . _build/html sphinx-build -v -n -b html -d _build/doctrees -j $(nproc) -w _build/html.log . _build/html
- name: 📤 Upload 'HTML Documentation' artifact - name: 📤 Upload 'HTML Documentation' artifact
uses: pyTooling/upload-artifact@v4
if: inputs.html_artifact != '' if: inputs.html_artifact != ''
continue-on-error: true continue-on-error: true
uses: pyTooling/upload-artifact@v4
with: with:
name: ${{ inputs.html_artifact }} name: ${{ inputs.html_artifact }}
working-directory: ${{ inputs.doc_directory }}/_build/html working-directory: ${{ inputs.doc_directory }}/_build/html
@@ -157,15 +157,15 @@ jobs:
python -m pip install --disable-pip-version-check ${{ inputs.requirements }} python -m pip install --disable-pip-version-check ${{ inputs.requirements }}
- name: 📥 Download artifacts '${{ inputs.unittest_xml_artifact }}' from 'Unittesting' job - name: 📥 Download artifacts '${{ inputs.unittest_xml_artifact }}' from 'Unittesting' job
uses: pyTooling/download-artifact@v4
if: inputs.unittest_xml_artifact != '' if: inputs.unittest_xml_artifact != ''
uses: pyTooling/download-artifact@v4
with: with:
name: ${{ inputs.unittest_xml_artifact }} name: ${{ inputs.unittest_xml_artifact }}
path: ${{ inputs.unittest_xml_directory }} path: ${{ inputs.unittest_xml_directory }}
- name: 📥 Download artifacts '${{ inputs.coverage_json_artifact }}' from 'PublishCoverageResults' job - name: 📥 Download artifacts '${{ inputs.coverage_json_artifact }}' from 'PublishCoverageResults' job
uses: pyTooling/download-artifact@v4
if: inputs.coverage_json_artifact != '' if: inputs.coverage_json_artifact != ''
uses: pyTooling/download-artifact@v4
with: with:
name: ${{ inputs.coverage_json_artifact }} name: ${{ inputs.coverage_json_artifact }}
path: ${{ inputs.coverage_report_json_directory }} path: ${{ inputs.coverage_report_json_directory }}
@@ -180,92 +180,10 @@ jobs:
sphinx-build -v -n -b latex -d _build/doctrees -j $(nproc) -w _build/latex.log . _build/latex sphinx-build -v -n -b latex -d _build/doctrees -j $(nproc) -w _build/latex.log . _build/latex
# --builder html --doctree-dir _build/doctrees --verbose --fresh-env --write-all --nitpicky --warning-file _build/html.log . _build/html # --builder html --doctree-dir _build/doctrees --verbose --fresh-env --write-all --nitpicky --warning-file _build/html.log . _build/html
- name: Workaround I - https://github.com/sphinx-doc/sphinx/issues/13190
if: inputs.latex_artifact != ''
run: |
printf "Changing directory to 'doc/_build/latex' ...\n"
cd doc/_build/latex
MIMETYPE_EXTENSIONS=(
"image/png:png"
"image/jpeg:jpg"
"image/svg+xml:svg"
)
printf "Changing file extension according to MIME type ...\n"
while IFS=$'\n' read -r file; do
printf " Checking '%s' ... " "${file}"
mime="$(file --mime-type -b "${file}")"
printf "[%s]\n" "${mime}"
found=0
for MIME in "${MIMETYPE_EXTENSIONS[@]}"; do
mimetype="${MIME%%:*}"
extension="${MIME#*:}"
if [[ "${mime}" == "${mimetype}" && "${file##*.}" != "${extension}" ]]; then
printf " Rename file to '%s' " "${file}.${extension}"
mv "${file}" "${file}.${extension}"
if [[ $? -eq 0 ]]; then
printf "[OK]\n"
else
printf "[FAILED]\n"
fi
printf " Patching LaTeX file for '%s' " "${file}"
sed -i "s:{{${file%.*}}\.${file##*.}}:{{${file}}.${extension}}:g" *.tex
if [[ $? -eq 0 ]]; then
printf "[OK]\n"
else
printf "[FAILED]\n"
fi
found=1
break
fi
done
if [[ $found -eq 0 ]]; then
printf "[SKIPPED]\n"
fi
done < <(find . -type f -not -iname "*.cls" -not -iname "*.sty" -not -iname "*.xdy" -not -iname "*.svg" -not -iname "*.png" -not -iname "*.jpg" | sed 's:./::')
- name: Workaround II - https://github.com/sphinx-doc/sphinx/issues/13189
if: inputs.latex_artifact != ''
run: |
printf "Changing directory to 'doc/_build/latex' ...\n"
cd doc/_build/latex
printf "Searching for downloaded images, that need normalization ...\n"
for imageExt in png svg jpg jpeg; do
printf " Processing '%s' ...\n" "${imageExt}"
while IFS=$'\n' read -r imageFile; do
newFile="${imageFile//%/_}";
printf " %s\n" "$imageFile";
if [[ "${imageFile}" != "${newFile}" ]]; then
printf " Rename file to '%s' " "${newFile}"
mv "${imageFile}" "${newFile}"
if [[ $? -eq 0 ]]; then
printf "[OK]\n"
else
printf "[FAILED]\n"
fi
printf " Patching LaTeX file for '%s' " "${newFile}"
sed -i "s:{{${imageFile%.*}}\.${imageFile##*.}}:{{${newFile%.*}}.${newFile##*.}}:g" *.tex
if [[ $? -eq 0 ]]; then
printf "[OK]\n"
else
printf "[FAILED]\n"
fi
fi
done < <(find . -type f -iname "*.$imageExt" | sed 's:./::')
done
- name: 📤 Upload 'LaTeX Documentation' artifact - name: 📤 Upload 'LaTeX Documentation' artifact
uses: pyTooling/upload-artifact@v4
if: inputs.latex_artifact != '' if: inputs.latex_artifact != ''
continue-on-error: true continue-on-error: true
uses: pyTooling/upload-artifact@v4
with: with:
name: ${{ inputs.latex_artifact }} name: ${{ inputs.latex_artifact }}
working-directory: ${{ inputs.doc_directory }}/_build/latex working-directory: ${{ inputs.doc_directory }}/_build/latex

View File

@@ -87,9 +87,9 @@ jobs:
run: ${{ inputs.commands }} run: ${{ inputs.commands }}
- name: 📤 Upload 'Static Typing Report' HTML artifact - name: 📤 Upload 'Static Typing Report' HTML artifact
uses: pyTooling/upload-artifact@v4
if: ${{ inputs.html_artifact != '' }} if: ${{ inputs.html_artifact != '' }}
continue-on-error: true continue-on-error: true
uses: pyTooling/upload-artifact@v4
with: with:
name: ${{ inputs.html_artifact }} name: ${{ inputs.html_artifact }}
working-directory: ${{ inputs.html_report }} working-directory: ${{ inputs.html_report }}
@@ -98,9 +98,9 @@ jobs:
retention-days: 1 retention-days: 1
- name: 📤 Upload 'Static Typing Report' JUnit artifact - name: 📤 Upload 'Static Typing Report' JUnit artifact
uses: pyTooling/upload-artifact@v4
if: ${{ inputs.junit_artifact != '' }} if: ${{ inputs.junit_artifact != '' }}
continue-on-error: true continue-on-error: true
uses: pyTooling/upload-artifact@v4
with: with:
name: ${{ inputs.junit_artifact }} name: ${{ inputs.junit_artifact }}
path: ${{ inputs.junit_report }} path: ${{ inputs.junit_report }}

View File

@@ -64,7 +64,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- run: printf "%s\n" "Build some tool and generate some (versioned) artifacts" > artifact-$(date -u +"%Y-%m-%dT%H-%M-%SZ").txt - run: echo "Build some tool and generate some (versioned) artifacts" > artifact-$(date -u +"%Y-%m-%dT%H-%M-%SZ").txt
- name: Single - name: Single
uses: ./releaser/composite uses: ./releaser/composite
@@ -84,7 +84,7 @@ jobs:
- name: Add artifacts/*.txt - name: Add artifacts/*.txt
run: | run: |
mkdir artifacts mkdir artifacts
printf "%s\n" "Build some tool and generate some artifacts" > artifacts/artifact.txt echo "Build some tool and generate some artifacts" > artifacts/artifact.txt
touch artifacts/empty_file.txt touch artifacts/empty_file.txt
- name: Single in subdir - name: Single in subdir
@@ -95,8 +95,8 @@ jobs:
- name: Add artifacts/*.md - name: Add artifacts/*.md
run: | run: |
printf "%s\n" "releaser hello" > artifacts/hello.md echo "releaser hello" > artifacts/hello.md
printf "%s\n" "releaser world" > artifacts/world.md echo "releaser world" > artifacts/world.md
- name: Directory wildcard - name: Directory wildcard
uses: ./releaser/composite uses: ./releaser/composite
@@ -107,7 +107,7 @@ jobs:
- name: Add artifacts/subdir - name: Add artifacts/subdir
run: | run: |
mkdir artifacts/subdir mkdir artifacts/subdir
printf "%s\n" "Test recursive glob" > artifacts/subdir/deep_file.txt echo "Test recursive glob" > artifacts/subdir/deep_file.txt
- name: Directory wildcard (recursive) - name: Directory wildcard (recursive)
uses: ./releaser/composite uses: ./releaser/composite
@@ -124,7 +124,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- run: printf "%s\n" "Build some tool and generate some (versioned) artifacts" > artifact-$(date -u +"%Y-%m-%dT%H-%M-%SZ").txt - run: echo "Build some tool and generate some (versioned) artifacts" > artifact-$(date -u +"%Y-%m-%dT%H-%M-%SZ").txt
- name: Single - name: Single
uses: ./releaser uses: ./releaser
@@ -144,7 +144,7 @@ jobs:
- name: Add artifacts/*.txt - name: Add artifacts/*.txt
run: | run: |
mkdir artifacts mkdir artifacts
printf "%s\n" "Build some tool and generate some artifacts" > artifacts/artifact.txt echo "Build some tool and generate some artifacts" > artifacts/artifact.txt
touch artifacts/empty_file.txt touch artifacts/empty_file.txt
- name: Single in subdir - name: Single in subdir
@@ -155,8 +155,8 @@ jobs:
- name: Add artifacts/*.md - name: Add artifacts/*.md
run: | run: |
printf "%s\n" "releaser hello" > artifacts/hello.md echo "releaser hello" > artifacts/hello.md
printf "%s\n" "releaser world" > artifacts/world.md echo "releaser world" > artifacts/world.md
- name: Directory wildcard - name: Directory wildcard
uses: ./releaser uses: ./releaser
@@ -167,7 +167,7 @@ jobs:
- name: Add artifacts/subdir - name: Add artifacts/subdir
run: | run: |
mkdir artifacts/subdir mkdir artifacts/subdir
printf "%s\n" "Test recursive glob" > artifacts/subdir/deep_file.txt echo "Test recursive glob" > artifacts/subdir/deep_file.txt
- name: Directory wildcard (recursive) - name: Directory wildcard (recursive)
uses: ./releaser uses: ./releaser

View File

@@ -94,26 +94,11 @@ on:
required: false required: false
default: 'unit' default: 'unit'
type: string type: string
unittest_report_xml_directory:
description: 'Path where to save the unittest summary report XML.'
required: false
default: 'report/unit'
type: string
unittest_report_xml_filename:
description: 'Filename of the unittest summary report XML.'
required: false
default: 'TestReportSummary.xml'
type: string
coverage_config: coverage_config:
description: 'Path to the .coveragerc file. Use pyproject.toml by default.' description: 'Path to the .coveragerc file. Use pyproject.toml by default.'
required: false required: false
default: 'pyproject.toml' default: 'pyproject.toml'
type: string type: string
coverage_report_html_directory:
description: ''
required: false
default: 'report/coverage/html'
type: string
unittest_xml_artifact: unittest_xml_artifact:
description: "Generate unit test report with junitxml and upload results as an artifact." description: "Generate unit test report with junitxml and upload results as an artifact."
required: false required: false
@@ -282,8 +267,8 @@ jobs:
# Python setup # Python setup
- name: '🟦 Setup MSYS2 for ${{ matrix.runtime }}' - name: '🟦 Setup MSYS2 for ${{ matrix.runtime }}'
uses: msys2/setup-msys2@v2
if: matrix.system == 'msys2' if: matrix.system == 'msys2'
uses: msys2/setup-msys2@v2
with: with:
msystem: ${{ matrix.runtime }} msystem: ${{ matrix.runtime }}
update: true update: true
@@ -292,8 +277,8 @@ jobs:
${{ inputs.pacboy }} ${{ inputs.pacboy }}
- name: 🐍 Setup Python ${{ matrix.python }} - name: 🐍 Setup Python ${{ matrix.python }}
uses: actions/setup-python@v5
if: matrix.system != 'msys2' if: matrix.system != 'msys2'
uses: actions/setup-python@v5
with: with:
python-version: ${{ matrix.python }} python-version: ${{ matrix.python }}
@@ -338,6 +323,69 @@ jobs:
if: matrix.system == 'msys2' && matrix.runtime == 'UCRT64' && inputs.ucrt64_before_script != '' if: matrix.system == 'msys2' && matrix.runtime == 'UCRT64' && inputs.ucrt64_before_script != ''
run: ${{ inputs.ucrt64_before_script }} run: ${{ inputs.ucrt64_before_script }}
# Read pyproject.toml
- name: 🔁 Extract configurations from pyproject.toml
id: getVariables
shell: python
run: |
from os import getenv
from pathlib import Path
from sys import version
from textwrap import dedent
print(f"Python: {version}")
from tomli import load as tomli_load
htmlDirectory = Path("htmlcov")
xmlFile = Path("./coverage.xml")
jsonFile = Path("./coverage.json")
coverageRC = "${{ inputs.coverage_config }}".strip()
# Read output paths from 'pyproject.toml' file
if coverageRC == "pyproject.toml":
pyProjectFile = Path("pyproject.toml")
if pyProjectFile.exists():
with pyProjectFile.open("rb") as file:
pyProjectSettings = tomli_load(file)
htmlDirectory = Path(pyProjectSettings["tool"]["coverage"]["html"]["directory"])
xmlFile = Path(pyProjectSettings["tool"]["coverage"]["xml"]["output"])
jsonFile = Path(pyProjectSettings["tool"]["coverage"]["json"]["output"])
else:
print(f"File '{pyProjectFile}' not found.")
print(f"::error title=FileNotFoundError::File '{pyProjectFile}' not found.")
exit(1)
# Read output paths from '.coveragerc' file
elif len(coverageRC) > 0:
coverageRCFile = Path(coverageRC)
if coverageRCFile.exists():
with coverageRCFile.open("rb") as file:
coverageRCSettings = tomli_load(file)
htmlDirectory = Path(coverageRCSettings["html"]["directory"])
xmlFile = Path(coverageRCSettings["xml"]["output"])
jsonFile = Path(coverageRCSettings["json"]["output"])
else:
print(f"File '{coverageRCFile}' not found.")
print(f"::error title=FileNotFoundError::File '{coverageRCFile}' not found.")
exit(1)
# Write jobs to special file
github_output = Path(getenv("GITHUB_OUTPUT"))
print(f"GITHUB_OUTPUT: {github_output}")
with github_output.open("a+", encoding="utf-8") as f:
f.write(dedent(f"""\
unittest_report_html_directory={htmlDirectory}
coverage_report_html_directory={htmlDirectory.as_posix()}
coverage_report_xml={xmlFile}
coverage_report_json={jsonFile}
"""))
print(f"DEBUG:\n html={htmlDirectory}\n xml={xmlFile}\n json={jsonFile}")
# Run pytests # Run pytests
- name: ✅ Run unit tests (Ubuntu/macOS) - name: ✅ Run unit tests (Ubuntu/macOS)
@@ -347,12 +395,12 @@ jobs:
export PYTHONPATH=$(pwd) export PYTHONPATH=$(pwd)
cd "${{ inputs.root_directory || '.' }}" cd "${{ inputs.root_directory || '.' }}"
[ -n '${{ inputs.unittest_xml_artifact }}' ] && PYTEST_ARGS='--junitxml=${{ inputs.unittest_report_xml_directory }}/${{ inputs.unittest_report_xml_filename }}' || unset PYTEST_ARGS [ -n '${{ inputs.unittest_xml_artifact }}' ] && PYTEST_ARGS='--junitxml=report/unit/TestReportSummary.xml' || unset PYTEST_ARGS
if [ -n '${{ inputs.coverage_config }}' ]; then if [ -n '${{ inputs.coverage_config }}' ]; then
printf "%s\n" "coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }}" echo "coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }}"
coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }} coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }}
else else
printf "%s\n" "python -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }}" echo "python -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }}"
python -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }} python -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }}
fi fi
@@ -363,7 +411,7 @@ jobs:
$env:PYTHONPATH = (Get-Location).ToString() $env:PYTHONPATH = (Get-Location).ToString()
cd "${{ inputs.root_directory || '.' }}" cd "${{ inputs.root_directory || '.' }}"
$PYTEST_ARGS = if ("${{ inputs.unittest_xml_artifact }}") { "--junitxml=${{ inputs.unittest_report_xml_directory }}/${{ inputs.unittest_report_xml_filename }}" } else { "" } $PYTEST_ARGS = if ("${{ inputs.unittest_xml_artifact }}") { "--junitxml=report/unit/TestReportSummary.xml" } else { "" }
if ("${{ inputs.coverage_config }}") { if ("${{ inputs.coverage_config }}") {
Write-Host "coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -raP --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }}" Write-Host "coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -raP --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }}"
coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }} coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }}
@@ -386,19 +434,19 @@ jobs:
if: inputs.coverage_html_artifact != '' if: inputs.coverage_html_artifact != ''
continue-on-error: true continue-on-error: true
run: | run: |
coverage html --data-file=.coverage -d ${{ inputs.coverage_report_html_directory }} coverage html --data-file=.coverage -d ${{ steps.getVariables.outputs.coverage_report_html_directory }}
rm ${{ inputs.coverage_report_html_directory }}/.gitignore rm ${{ steps.getVariables.outputs.coverage_report_html_directory }}/.gitignore
# Upload artifacts # Upload artifacts
- name: 📤 Upload '${{ inputs.unittest_report_xml_filename }}' artifact - name: 📤 Upload 'TestReportSummary.xml' artifact
uses: pyTooling/upload-artifact@v4
if: inputs.unittest_xml_artifact != '' if: inputs.unittest_xml_artifact != ''
continue-on-error: true continue-on-error: true
uses: pyTooling/upload-artifact@v4
with: with:
name: ${{ inputs.unittest_xml_artifact }}-${{ matrix.system }}-${{ matrix.runtime }}-${{ matrix.python }} name: ${{ inputs.unittest_xml_artifact }}-${{ matrix.system }}-${{ matrix.runtime }}-${{ matrix.python }}
working-directory: ${{ inputs.unittest_report_xml_directory }} working-directory: report/unit
path: ${{ inputs.unittest_report_xml_filename }} path: TestReportSummary.xml
if-no-files-found: error if-no-files-found: error
retention-days: 1 retention-days: 1

View File

@@ -6,7 +6,7 @@ on:
jobs: jobs:
Params: Params:
uses: pyTooling/Actions/.github/workflows/Parameters.yml@main uses: pyTooling/Actions/.github/workflows/Parameters.yml@r2
with: with:
name: Example name: Example
python_version_list: "3.12 3.13" python_version_list: "3.12 3.13"
@@ -22,7 +22,7 @@ jobs:
include: ${{ fromJson(needs.Params.outputs.python_jobs) }} include: ${{ fromJson(needs.Params.outputs.python_jobs) }}
steps: steps:
- name: Content creation for ${{ matrix.system }}-${{ matrix.python }} - name: Content creation for ${{ matrix.system }}-${{ matrix.python }}
run: printf "%s\n" "${{ matrix.runs-on }}-${{ matrix.python }}" >> artifact.txt run: echo "${{ matrix.runs-on }}-${{ matrix.python }}" >> artifact.txt
- name: 📤 Upload artifact for ${{ matrix.system }}-${{ matrix.python }} - name: 📤 Upload artifact for ${{ matrix.system }}-${{ matrix.python }}
uses: pyTooling/upload-artifact@v4 uses: pyTooling/upload-artifact@v4
@@ -39,7 +39,7 @@ jobs:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- name: Package creation - name: Package creation
run: printf "%s\n" "Package" >> package.txt run: echo "Package" >> package.txt
- name: 📤 Upload artifact for ${{ matrix.system }}-${{ matrix.python }} - name: 📤 Upload artifact for ${{ matrix.system }}-${{ matrix.python }}
uses: pyTooling/upload-artifact@v4 uses: pyTooling/upload-artifact@v4
@@ -50,7 +50,7 @@ jobs:
retention-days: 1 retention-days: 1
ArtifactCleanUp: ArtifactCleanUp:
uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@main uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@r2
needs: needs:
- Params - Params
- Testing - Testing

View File

@@ -6,62 +6,64 @@ on:
jobs: jobs:
ConfigParams: ConfigParams:
uses: pyTooling/Actions/.github/workflows/ExtractConfiguration.yml@main uses: pyTooling/Actions/.github/workflows/ExtractConfiguration.yml@r3
with: with:
package_name: pyDummy package_name: pyDummy
UnitTestingParams: UnitTestingParams:
uses: pyTooling/Actions/.github/workflows/Parameters.yml@main uses: pyTooling/Actions/.github/workflows/Parameters.yml@r3
with: with:
name: pyDummy name: pyDummy
python_version_list: "3.9 3.10 3.11 3.12 3.13 pypy-3.9 pypy-3.10" python_version_list: "3.9 3.10 3.11 3.12 3.13 pypy-3.9 pypy-3.10"
# disable_list: "windows:pypy-3.10" # disable_list: "windows:pypy-3.10"
PlatformTestingParams: PlatformTestingParams:
uses: pyTooling/Actions/.github/workflows/Parameters.yml@main uses: pyTooling/Actions/.github/workflows/Parameters.yml@r3
with: with:
name: Platform name: Platform
python_version_list: "" python_version_list: ""
system_list: "ubuntu windows macos mingw64 clang64 ucrt64" system_list: "ubuntu windows macos mingw32 mingw64 clang64 ucrt64"
UnitTesting: UnitTesting:
uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@main uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@r3
needs: needs:
- ConfigParams
- UnitTestingParams - UnitTestingParams
with: with:
jobs: ${{ needs.UnitTestingParams.outputs.python_jobs }} jobs: ${{ needs.UnitTestingParams.outputs.python_jobs }}
unittest_report_xml_directory: ${{ needs.ConfigParams.outputs.unittest_report_xml_directory }} unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
unittest_report_xml_filename: ${{ needs.ConfigParams.outputs.unittest_report_xml_filename }} unittest_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_html }}
coverage_report_html_directory: ${{ needs.ConfigParams.outputs.coverage_report_html_directory }} # coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}
unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
unittest_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_html }}
coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}
# coverage_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }} # coverage_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }}
# coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }} # coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}
# coverage_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }} # coverage_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
PlatformTesting: PlatformTesting:
uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@main uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@r3
needs: needs:
- ConfigParams
- PlatformTestingParams - PlatformTestingParams
with: with:
jobs: ${{ needs.PlatformTestingParams.outputs.python_jobs }} jobs: ${{ needs.PlatformTestingParams.outputs.python_jobs }}
# tests_directory: "" # tests_directory: ""
unittest_directory: platform unittest_directory: platform
unittest_report_xml_directory: ${{ needs.ConfigParams.outputs.unittest_report_xml_directory }} unittest_xml_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).unittesting_xml }}
unittest_report_xml_filename: ${{ needs.ConfigParams.outputs.unittest_report_xml_filename }} unittest_html_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).unittesting_html }}
coverage_report_html_directory: ${{ needs.ConfigParams.outputs.coverage_report_html_directory }} coverage_sqlite_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_sqlite }}
unittest_xml_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).unittesting_xml }} coverage_xml_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_xml }}
unittest_html_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).unittesting_html }} coverage_json_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_json }}
coverage_sqlite_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_sqlite }} coverage_html_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_html }}
coverage_xml_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_xml }}
coverage_json_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_json }} # Coverage:
coverage_html_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_html }} # uses: pyTooling/Actions/.github/workflows/CoverageCollection.yml@r3
# needs:
# - UnitTestingParams
# with:
# python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
# artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
# secrets:
# codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }}
StaticTypeCheck: StaticTypeCheck:
uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@main uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@r3
needs: needs:
- ConfigParams - ConfigParams
- UnitTestingParams - UnitTestingParams
@@ -74,7 +76,7 @@ jobs:
html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }} html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}
DocCoverage: DocCoverage:
uses: pyTooling/Actions/.github/workflows/CheckDocumentation.yml@main uses: pyTooling/Actions/.github/workflows/CheckDocumentation.yml@r1
needs: needs:
- ConfigParams - ConfigParams
- UnitTestingParams - UnitTestingParams
@@ -84,48 +86,48 @@ jobs:
# fail_below: 70 # fail_below: 70
Package: Package:
uses: pyTooling/Actions/.github/workflows/Package.yml@main uses: pyTooling/Actions/.github/workflows/Package.yml@r3
needs: needs:
- UnitTestingParams - UnitTestingParams
- UnitTesting - UnitTesting
# - Coverage
- PlatformTesting - PlatformTesting
with: with:
python_version: ${{ needs.UnitTestingParams.outputs.python_version }} python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }} artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}
PublishCoverageResults: PublishCoverageResults:
uses: pyTooling/Actions/.github/workflows/PublishCoverageResults.yml@main uses: pyTooling/Actions/.github/workflows/PublishCoverageResults.yml@r3
needs: needs:
- UnitTestingParams - UnitTestingParams
- UnitTesting - UnitTesting
- PlatformTesting - PlatformTesting
# - Coverage
with: with:
coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }} coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}
coverage_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }} coverage_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }}
coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }} coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}
coverage_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }} coverage_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
secrets: secrets:
codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }} codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }}
PublishTestResults: PublishTestResults:
uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@main uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@r3
needs: needs:
- UnitTestingParams
- UnitTesting - UnitTesting
- PlatformTesting - PlatformTesting
with: with:
additional_merge_args: '-d "--pytest=rewrite-dunder-init;reduce-depth:pytest.tests.unit;reduce-depth:pytest.tests.platform"' additional_merge_args: '-d "--pytest=rewrite-dunder-init;reduce-depth:pytest.tests.unit;reduce-depth:pytest.tests.platform"'
merged_junit_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
# VerifyDocs: # VerifyDocs:
# uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@main # uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@r3
# needs: # needs:
# - UnitTestingParams # - UnitTestingParams
# with: # with:
# python_version: ${{ needs.UnitTestingParams.outputs.python_version }} # python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
Documentation: Documentation:
uses: pyTooling/Actions/.github/workflows/SphinxDocumentation.yml@main uses: pyTooling/Actions/.github/workflows/SphinxDocumentation.yml@r3
needs: needs:
- ConfigParams - ConfigParams
- UnitTestingParams - UnitTestingParams
@@ -135,13 +137,13 @@ jobs:
with: with:
python_version: ${{ needs.UnitTestingParams.outputs.python_version }} python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
coverage_report_json_directory: ${{ needs.ConfigParams.outputs.coverage_report_json_directory }} coverage_report_json_directory: ${{ needs.ConfigParams.outputs.coverage_report_json_directory }}
unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }} # unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }} # coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}
html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }} html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }}
latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }} latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }}
IntermediateCleanUp: IntermediateCleanUp:
uses: pyTooling/Actions/.github/workflows/IntermediateCleanUp.yml@main uses: pyTooling/Actions/.github/workflows/IntermediateCleanUp.yml@r1
needs: needs:
- UnitTestingParams - UnitTestingParams
- PublishCoverageResults - PublishCoverageResults
@@ -149,24 +151,25 @@ jobs:
- Documentation - Documentation
with: with:
sqlite_coverage_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}- sqlite_coverage_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}-
xml_unittest_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}- xml_unittest_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}-
PDFDocumentation: PDFDocumentation:
uses: pyTooling/Actions/.github/workflows/LaTeXDocumentation.yml@main uses: pyTooling/Actions/.github/workflows/LaTeXDocumentation.yml@r3
needs: needs:
- UnitTestingParams - UnitTestingParams
- Documentation - Documentation
with: with:
document: Actions document: actions
latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }} latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }}
pdf_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_pdf }} pdf_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_pdf }}
PublishToGitHubPages: PublishToGitHubPages:
uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@main uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@r3
needs: needs:
- UnitTestingParams - UnitTestingParams
- Documentation - Documentation
- PDFDocumentation # - PDFDocumentation
# - Coverage
- PublishCoverageResults - PublishCoverageResults
- StaticTypeCheck - StaticTypeCheck
with: with:
@@ -175,17 +178,18 @@ jobs:
typing: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }} typing: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}
ReleasePage: ReleasePage:
uses: pyTooling/Actions/.github/workflows/Release.yml@main uses: pyTooling/Actions/.github/workflows/Release.yml@r3
if: startsWith(github.ref, 'refs/tags') if: startsWith(github.ref, 'refs/tags')
needs: needs:
- UnitTesting - UnitTesting
- PlatformTesting - PlatformTesting
# - Coverage
# - StaticTypeCheck # - StaticTypeCheck
- Package - Package
- PublishToGitHubPages - PublishToGitHubPages
PublishOnPyPI: PublishOnPyPI:
uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@main uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@r3
if: startsWith(github.ref, 'refs/tags') if: startsWith(github.ref, 'refs/tags')
needs: needs:
- UnitTestingParams - UnitTestingParams
@@ -199,15 +203,16 @@ jobs:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
ArtifactCleanUp: ArtifactCleanUp:
uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@main uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@r3
needs: needs:
- UnitTestingParams - UnitTestingParams
- PlatformTestingParams - PlatformTestingParams
- UnitTesting - UnitTesting
# - Coverage
- StaticTypeCheck - StaticTypeCheck
- PlatformTesting - PlatformTesting
- Documentation - Documentation
- PDFDocumentation # - PDFDocumentation
- PublishTestResults - PublishTestResults
- PublishCoverageResults - PublishCoverageResults
- PublishToGitHubPages - PublishToGitHubPages
@@ -217,6 +222,7 @@ jobs:
remaining: | remaining: |
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}-* ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}-*
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_html }}-* ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_html }}-*
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}-*
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }}-* ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }}-*
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}-* ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}-*
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}-* ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}-*
@@ -228,9 +234,9 @@ jobs:
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }} ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }} ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }} ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }}
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }}
${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).unittesting_xml }}-* ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).unittesting_xml }}-*
${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).unittesting_html }}-* ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).unittesting_html }}-*
${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_sqlite }}-*
${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_xml }}-* ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_xml }}-*
${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_json }}-* ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_json }}-*
${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_html }}-* ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_html }}-*

View File

@@ -6,7 +6,7 @@ on:
jobs: jobs:
NamespacePackage: NamespacePackage:
uses: pyTooling/Actions/.github/workflows/CompletePipeline.yml@main uses: pyTooling/Actions/.github/workflows/CompletePipeline.yml@r2
with: with:
package_namespace: pyExamples package_namespace: pyExamples
package_name: Extensions package_name: Extensions

View File

@@ -12,9 +12,9 @@ jobs:
steps: steps:
- name: 🖉 Build 1 - name: 🖉 Build 1
run: | run: |
printf "%s\n" "Document 1 $(date --utc '+%d.%m.%Y - %H:%M:%S')" > document1.txt echo "Document 1 $(date --utc '+%d.%m.%Y - %H:%M:%S')" > document1.txt
printf "%s\n" "Analysis log $(date --utc '+%d.%m.%Y - %H:%M:%S')" > analysis.log echo "Analysis log $(date --utc '+%d.%m.%Y - %H:%M:%S')" > analysis.log
printf "%s\n" "Build log $(date --utc '+%d.%m.%Y - %H:%M:%S')" > build.log echo "Build log $(date --utc '+%d.%m.%Y - %H:%M:%S')" > build.log
- name: 📤 Upload artifact - name: 📤 Upload artifact
uses: pyTooling/upload-artifact@v4 uses: pyTooling/upload-artifact@v4
@@ -28,8 +28,8 @@ jobs:
- name: 🖉 Program - name: 🖉 Program
run: | run: |
printf "%s\n" "Document other $(date --utc '+%d.%m.%Y - %H:%M:%S')" > document1.txt echo "Document other $(date --utc '+%d.%m.%Y - %H:%M:%S')" > document1.txt
printf "%s\n" "Program $(date --utc '+%d.%m.%Y - %H:%M:%S')" > program.py echo "Program $(date --utc '+%d.%m.%Y - %H:%M:%S')" > program.py
- name: 📤 Upload artifact - name: 📤 Upload artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
@@ -56,13 +56,35 @@ jobs:
version=4.2.0 version=4.2.0
tool=myTool tool=myTool
prog=program prog=program
nightly_title: "Nightly Test Release" nightly_title: "Nightly Release"
nightly_description: | nightly_description: |
This *nightly* release contains all latest and important artifacts created by %tool%'s CI pipeline. This *nightly* release contains all latest and important artifacts created by GHDL's CI pipeline.
# %tool% %version% # GHDL %version%
* %prog% GHDL offers the simulator and synthesis tool for VHDL. GHDL can be build for various backends:
* `gcc` - using the GCC compiler framework
* `mcode` - in memory code generation
* `llvm` - using the LLVM compiler framework
* `llvm-jit` - using the LLVM compiler framework, but in memory
The following asset categories are provided for GHDL:
* macOS x64-64 builds as TAR/GZ file
* macOS aarch64 builds as TAR/GZ file
* Ubuntu 24.04 LTS builds as TAR/GZ file
* Windows builds for standalone usage (without MSYS2) as ZIP file
* MSYS2 packages as TAR/ZST file
# pyGHDL %version%
The Python package `pyGHDL` offers Python binding (`pyGHDL.libghdl`) to a `libghdl` shared library (`*.so`/`*.dll`).
In addition to the low-level binding layer, pyGHDL offers:
* a Language Server Protocol (LSP) instance for e.g. live code checking by editors
* a Code Document Object Model (CodeDOM) based on [pyVHDLModel](https://github.com/VHDL/pyVHDLModel)
The following asset categories are provided for pyGHDL:
* Platform specific Python wheel package for Ubuntu incl. `pyGHDL...so`
* Platform specific Python wheel package for Windows incl. `pyGHDL...dll`
assets: | assets: |
document: document1.txt: Documentation document: document1.txt: Documentation
document: build.log: Logfile - %tool% - %tool% document: build.log: Logfile - %tool% - %tool%
@@ -77,44 +99,3 @@ jobs:
document:$archive7.tar.gz: Archive 7 - tar.gz + dir document:$archive7.tar.gz: Archive 7 - tar.gz + dir
document:$archive8.tzst: Archive 8 - tzst + dir document:$archive8.tzst: Archive 8 - tzst + dir
document:$archive9.tar.zst:Archive 9 - tar.zst + dir document:$archive9.tar.zst:Archive 9 - tar.zst + dir
NightlyPageWithInventory:
uses: ./.github/workflows/NightlyRelease.yml
needs:
- Build
secrets: inherit
permissions:
contents: write
actions: write
# attestations: write
with:
replacements: |
version=4.2.0
tool=myTool
prog=program
nightly_name: inventory
nightly_title: "Nightly Test Release with Inventory"
nightly_description: |
This *nightly* release contains all latest and important artifacts created by %tool%'s CI pipeline.
# %tool% %version%
* %prog%
* iventory.json
inventory-json: "inventory.json"
inventory-version: 4.2.5
inventory-categories: "kind1,kind2"
assets: |
document: document1.txt: doc,html: Documentation
document: build.log: build,log: Logfile - %tool% - %tool%
other: document1.txt: build,SBOM:SBOM - %version%
other: %prog%.py: app,binary:Application - %tool% - %version%
document:!archive1.zip: Archive 1 - zip
document:!archive2.tgz: Archive 2 - tgz
document:!archive3.tar.gz: Archive 3 - tar.gz
document:!archive4.tzst: Archive 4 - tzst
document:!archive5.tar.zst: Archive 5 - tar.zst
document:$archive6.tgz: Archive 6 - tgz + dir
document:$archive7.tar.gz: Archive 7 - tar.gz + dir
document:$archive8.tzst: Archive 8 - tzst + dir
document:$archive9.tar.zst: Archive 9 - tar.zst + dir

View File

@@ -6,24 +6,24 @@ on:
jobs: jobs:
Params_Default: Params_Default:
uses: pyTooling/Actions/.github/workflows/Parameters.yml@main uses: pyTooling/Actions/.github/workflows/Parameters.yml@r2
with: with:
name: Example name: Example
Params_PythonVersions: Params_PythonVersions:
uses: pyTooling/Actions/.github/workflows/Parameters.yml@main uses: pyTooling/Actions/.github/workflows/Parameters.yml@r2
with: with:
name: Example name: Example
python_version_list: "3.11 3.12 pypy-3.9 pypy-3.10" python_version_list: "3.11 3.12 pypy-3.9 pypy-3.10"
Params_Systems: Params_Systems:
uses: pyTooling/Actions/.github/workflows/Parameters.yml@main uses: pyTooling/Actions/.github/workflows/Parameters.yml@r2
with: with:
name: Example name: Example
system_list: "windows mingw32 mingw64" system_list: "windows mingw32 mingw64"
Params_Include: Params_Include:
uses: pyTooling/Actions/.github/workflows/Parameters.yml@main uses: pyTooling/Actions/.github/workflows/Parameters.yml@r2
with: with:
name: Example name: Example
python_version_list: "3.11" python_version_list: "3.11"
@@ -31,7 +31,7 @@ jobs:
include_list: "ubuntu:3.12 ubuntu:3.13" include_list: "ubuntu:3.12 ubuntu:3.13"
Params_Exclude: Params_Exclude:
uses: pyTooling/Actions/.github/workflows/Parameters.yml@main uses: pyTooling/Actions/.github/workflows/Parameters.yml@r2
with: with:
name: Example name: Example
python_version_list: "3.12" python_version_list: "3.12"
@@ -39,7 +39,7 @@ jobs:
exclude_list: "windows:3.12 windows:3.13" exclude_list: "windows:3.12 windows:3.13"
Params_Disable: Params_Disable:
uses: pyTooling/Actions/.github/workflows/Parameters.yml@main uses: pyTooling/Actions/.github/workflows/Parameters.yml@r2
with: with:
name: Example name: Example
python_version_list: "3.12" python_version_list: "3.12"
@@ -47,7 +47,7 @@ jobs:
disable_list: "windows:3.12 windows:3.13" disable_list: "windows:3.12 windows:3.13"
Params_All: Params_All:
uses: pyTooling/Actions/.github/workflows/Parameters.yml@main uses: pyTooling/Actions/.github/workflows/Parameters.yml@r2
with: with:
name: Example name: Example
python_version_list: "3.12 3.13" python_version_list: "3.12 3.13"
@@ -83,7 +83,7 @@ jobs:
expectedPythonVersion = "3.13" expectedPythonVersion = "3.13"
expectedPythons = ["3.9", "3.10", "3.11", "3.12", "3.13"] expectedPythons = ["3.9", "3.10", "3.11", "3.12", "3.13"]
expectedSystems = ["ubuntu", "windows", "macos", "macos-arm"] expectedSystems = ["ubuntu", "windows", "macos", "macos-arm"]
expectedJobs = [f"{system}:{python}" for system in expectedSystems for python in expectedPythons] + ["mingw64:3.12", "ucrt64:3.11"] expectedJobs = [f"{system}:{python}" for system in expectedSystems for python in expectedPythons] + ["mingw64:3.11", "ucrt64:3.11"]
expectedName = "Example" expectedName = "Example"
expectedArtifacts = { expectedArtifacts = {
"unittesting_xml": f"{expectedName}-UnitTestReportSummary-XML", "unittesting_xml": f"{expectedName}-UnitTestReportSummary-XML",
@@ -146,7 +146,7 @@ jobs:
expectedPythonVersion = "3.13" expectedPythonVersion = "3.13"
expectedPythons = ["3.11", "3.12", "pypy-3.9", "pypy-3.10"] expectedPythons = ["3.11", "3.12", "pypy-3.9", "pypy-3.10"]
expectedSystems = ["ubuntu", "windows", "macos", "macos-arm"] expectedSystems = ["ubuntu", "windows", "macos", "macos-arm"]
expectedJobs = [f"{system}:{python}" for system in expectedSystems for python in expectedPythons] + ["mingw64:3.12", "ucrt64:3.11"] expectedJobs = [f"{system}:{python}" for system in expectedSystems for python in expectedPythons] + ["mingw64:3.11", "ucrt64:3.11"]
expectedName = "Example" expectedName = "Example"
expectedArtifacts = { expectedArtifacts = {
"unittesting_xml": f"{expectedName}-UnitTestReportSummary-XML", "unittesting_xml": f"{expectedName}-UnitTestReportSummary-XML",
@@ -209,7 +209,7 @@ jobs:
expectedPythonVersion = "3.13" expectedPythonVersion = "3.13"
expectedPythons = ["3.9", "3.10", "3.11", "3.12", "3.13"] expectedPythons = ["3.9", "3.10", "3.11", "3.12", "3.13"]
expectedSystems = ["windows"] expectedSystems = ["windows"]
expectedJobs = [f"{system}:{python}" for system in expectedSystems for python in expectedPythons] + ["mingw32:3.12", "mingw64:3.11"] expectedJobs = [f"{system}:{python}" for system in expectedSystems for python in expectedPythons] + ["mingw32:3.11", "mingw64:3.11"]
expectedName = "Example" expectedName = "Example"
expectedArtifacts = { expectedArtifacts = {
"unittesting_xml": f"{expectedName}-UnitTestReportSummary-XML", "unittesting_xml": f"{expectedName}-UnitTestReportSummary-XML",

View File

@@ -6,7 +6,7 @@ on:
jobs: jobs:
SimplePackage: SimplePackage:
uses: pyTooling/Actions/.github/workflows/CompletePipeline.yml@main uses: pyTooling/Actions/.github/workflows/CompletePipeline.yml@r2
with: with:
package_name: pyDummy package_name: pyDummy
secrets: secrets:

178
ExamplePipeline.yml Normal file
View File

@@ -0,0 +1,178 @@
# ==================================================================================================================== #
# Authors: #
# Patrick Lehmann #
# Unai Martinez-Corral #
# #
# ==================================================================================================================== #
# Copyright 2020-2024 The pyTooling Authors #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
# You may obtain a copy of the License at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# Unless required by applicable law or agreed to in writing, software #
# distributed under the License is distributed on an "AS IS" BASIS, #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
# See the License for the specific language governing permissions and #
# limitations under the License. #
# #
# SPDX-License-Identifier: Apache-2.0 #
# ==================================================================================================================== #
name: Pipeline
on:
workflow_dispatch:
jobs:
# This job is a workaround for global variables
# See https://github.com/actions/runner/issues/480
Params:
uses: pyTooling/Actions/.github/workflows/Parameters.yml@main
with:
name: ToolName
# Optional
system_list: 'ubuntu windows msys2 macos'
python_version: '3.10'
python_version_list: '3.8 3.9 3.10'
UnitTesting:
uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@main
needs:
- Params
with:
jobs: ${{ needs.Params.outputs.python_jobs }}
# Optional
requirements: '-r tests/requirements.txt'
pacboy: >-
python-pip:p
python-wheel:p
python-coverage:p
python-lxml:p
mingw_requirements: '-r tests/requirements.mingw.txt'
tests_directory: 'tests'
unittest_directory: 'unit'
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).unittesting_xml }}
Coverage:
uses: pyTooling/Actions/.github/workflows/CoverageCollection.yml@main
needs:
- Params
with:
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).codecoverage_html }}
# Optional
python_version: ${{ needs..Params.outputs.python_version }}
requirements: '-r tests/requirements.txt'
tests_directory: 'tests'
unittest_directory: 'unit'
secrets:
codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }}
StaticTypeCheck:
uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@main
needs:
- Params
with:
commands: |
mypy --junit-xml StaticTypingSummary.xml --html-report htmlmypy -p ToolName
html_artifact: ${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }}
junit_artifact: ${{ fromJson(needs.Params.outputs.artifact_names).statictyping_junit }}
# Optional
python_version: ${{ needs..Params.outputs.python_version }}
requirements: '-r tests/requirements.txt'
html_report: 'htmlmypy'
junit_report: 'StaticTypingSummary.xml'
allow_failure: true
PublishTestResults:
uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@main
needs:
- UnitTesting
- StaticTypeCheck
with:
# Optional
report_files: artifacts/**/*.xml
Package:
uses: pyTooling/Actions/.github/workflows/Package.yml@main
needs:
- Params
- Coverage
with:
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).package_all }}
# Optional
python_version: ${{ needs..Params.outputs.python_version }}
requirements: 'wheel'
Release:
uses: pyTooling/Actions/.github/workflows/Release.yml@main
if: startsWith(github.ref, 'refs/tags')
needs:
- UnitTesting
- Coverage
- StaticTypeCheck
- Package
PublishOnPyPI:
uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@main
if: startsWith(github.ref, 'refs/tags')
needs:
- Params
- Release
- Package
with:
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).package_all }}
# Optional
python_version: ${{ needs..Params.outputs.python_version }}
requirements: 'wheel twine'
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
VerifyDocs:
uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@main
needs:
- Params
with:
# Optional
python_version: ${{ needs..Params.outputs.python_version }}
BuildTheDocs:
uses: pyTooling/Actions/.github/workflows/BuildTheDocs.yml@main
needs:
- Params
- VerifyDocs
with:
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).documentation_html }}
PublishToGitHubPages:
uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@main
needs:
- Params
- BuildTheDocs
- Coverage
- StaticTypeCheck
with:
doc: ${{ fromJson(needs.Params.outputs.artifact_names).documentation_html }}
# Optional
coverage: ${{ fromJson(needs.Params.outputs.artifact_names).codecoverage_html }}
typing: ${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }}
ArtifactCleanUp:
uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@main
needs:
- Params
- PublishTestResults
- Coverage
- StaticTypeCheck
- BuildTheDocs
- PublishToGitHubPages
with:
package: ${{ fromJson(needs.Params.outputs.artifact_names).package_all }}
remaining: |
${{ fromJson(needs.Params.outputs.artifact_names).unittesting_xml }}-*
${{ fromJson(needs.Params.outputs.artifact_names).codecoverage_html }}
${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }}
${{ fromJson(needs.Params.outputs.artifact_names).statictyping_junit }}
${{ fromJson(needs.Params.outputs.artifact_names).documentation_html }}

BIN
ExamplePipeline_dark.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

BIN
ExamplePipeline_light.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

111
README.md
View File

@@ -10,97 +10,52 @@ This repository gathers reusable CI tooling for testing, packaging and distribut
See [GitHub Actions and GitHub Reusable Workflows](https://pytooling.github.io/Actions/Background.html) for more See [GitHub Actions and GitHub Reusable Workflows](https://pytooling.github.io/Actions/Background.html) for more
background information. background information.
## Reusable Actions ## Reusable workflows
- **Artifacts:**
[**pyTooling/upload-artifact**](https://github.com/pyTooling/upload-artifact): The upload-artifact action will
preserve file attributes like permissions.
[**pyTooling/download-artifact**](https://github.com/pyTooling/download-artifact): The download-artifact action will
preserve file attributes like permissions.
## Predefined Docker Images
- **Documentation:**
[**MikTeX**](https://github.com/pyTooling/MikTeX): A predefined MikTeX image based on Debian Bookworm + Python 3.13
with specific tools for documentation generation using e.g. Sphinx and related extensions.
## Reusable Workflows
This repository provides 10+ *Reusable Workflows* based on the CI pipelines of the repos in this GitHub organisation, This repository provides 10+ *Reusable Workflows* based on the CI pipelines of the repos in this GitHub organisation,
[EDA²](https://github.com/edaa-org), [VHDL](https://github.com/vhdl), and others. By combining them, Python packages can [EDA²](https://github.com/edaa-org), [VHDL](https://github.com/vhdl), and others. By combining them, Python packages can
be continuously tested and released along with Sphinx documentation sites, to GitHub Releases, GitHub Pages and PyPI. be continuously tested and released along with Sphinx documentation sites, to GitHub Releases, GitHub Pages and PyPI.
Optionally, coverage and static type check reports can be gathered and integrated into the online documentation. Optionally, coverage and static type check reports can be gathered and integrated into the online documentation.
[![](doc/_static/pyTooling-Actions-SimplePackage.png)](doc/_static/pyTooling-Actions-SimplePackage.png) [![](ExamplePipeline_dark.png)](ExamplePipeline_dark.png)
[![](ExamplePipeline_light.png)](ExamplePipeline_light.png)
As shown in the screenshots above, the expected order is: As shown in the screenshots above, the expected order is:
- **Global:** - Global:
[**Parameters**](.github/workflows/Parameters.yml): It generates output parameters with artifact names and job matrices - [Parameters](.github/workflows/Parameters.yml): a workaround for the limitations to handle global variables in
to be used in later running jobs. GitHub Actions workflows (see [actions/runner#480](https://github.com/actions/runner/issues/480)).
It's a workaround for the limitations to handle global variables in GitHub Actions workflows (see It generates outputs with artifact names and job matrices to be used in later running jobs.
[actions/runner#480](https://github.com/actions/runner/issues/480)). - Code testing/analysis:
- [UnitTesting](.github/workflows/UnitTesting.yml): run unit test with `pytest` using multiple versions of Python, and
[**ExtractConfiguration**](.github/workflows/ExtractConfiguration.yml): extracts configuration values from optionally upload results as XML reports. Configuration options to `pytest` should be given via section
`pyproject.toml` and exposes configured paths and filenames as job output parameters. `[tool.pytest.ini_options]` in a `pyproject.toml` file.
- **Predefined pipelines:** - [CoverageCollection](.github/workflows/CoverageCollection.yml): collect code coverage data (incl. branch coverage)
[**CompletePipeline**](.github/workflows/CompletePipeline.yml): is a predefined pipeline for typical Python projects with `pytest`/`pytest-cov`/`coverage.py` using a single version of Python (latest). It generates HTML and Cobertura
using all predefined job templates of pyTooling at once: (unit testing, code coverage, static typing, documentation (XML)reports, upload the HTML report as an artifact, and upload the test results to Codecov and Codacy. Configuration
report generation and publishing, packaging, releasing, ...) options to `pytest` and `coverage.py` should be given via section `[tool.pytest.ini_options]` and `[tool.coverage.*]`
- **Code testing/analysis:** in a `pyproject.toml` file.
[**ApplicationTesting**](.github/workflows/ApplicationTesting.yml): like UnitTesting, but running tests using an - [StaticTypeCheck](.github/workflows/StaticTypeCheck.yml): collect static type check result with `mypy`, and
installed Python package. optionally upload results as an HTML report.
Example `commands`:
[**UnitTesting**](.github/workflows/UnitTesting.yml): run unit test with `pytest` using multiple versions of Python, and
optionally upload results as XML reports. Configuration options to `pytest` should be given via section
`[tool.pytest.ini_options]` in a `pyproject.toml` file.
Besides test results, also code coverage data (incl. branch coverage) can be collected using
`pytest`/`pytest-cov`/`coverage.py`. Configuration options to `coverage.py` should be given via section
`[tool.coverage.*]` in a `pyproject.toml` file.
While multiple report formats can be created in the job, it's recommended to use `PublishTestResults` and/or
`PublishCoverageResults` to merge results from matrix runs and then generate final reports as XML, JSON or HTML.
Finally, reports can be published to GitHub Pages or cloud services like Codecov and Codacy.
[**StaticTypeCheck**](.github/workflows/StaticTypeCheck.yml): collect static type check result with `mypy`, and
optionally upload results as an HTML report.
[**VerifyDocs**](.github/workflows/VerifyDocs.yml): extract code examples from the README and test these code snippets.
- **Packaging and releasing:**
[**Package**](.github/workflows/Package.yml): generate source and wheel packages, and upload them as an artifact.
[**PublishOnPyPI**](.github/workflows/PublishOnPyPI.yml): publish source and wheel packages to PyPI.
[**PublishTestResults**](.github/workflows/PublishTestResults.yml): publish unit test results through GH action `dorny/test-reporter`.
[**PublishCoverageResults**](.github/workflows/PublishCoverageResults.yml): publish ucode coverage results.
[**NightlyRelease**](.github/workflows/NightlyRelease.yml): publish GitHub Release.
[**Release**](.github/workflows/Release.yml): publish GitHub Release.
- **Documentation:**
[**SphinxDocumentation**](.github/workflows/PublishCoverageResults.yml): create HTML and LaTeX documentation using
Sphinx.
[**LaTeXDocumentation**](.github/workflows/LaTeXDocumentation.yml): compile LaTeX documentation to a PDF file using
MikTeX.
[**PublishToGitHubPages**](.github/workflows/PublishToGitHubPages.yml): publish HTML documentation to GitHub Pages.
- **Cleanup:**
[**IntermediateCleanUp**](.github/workflows/IntermediateCleanUp.yml): delete intermediate artifacts.
[**ArtifactCleanUp**](.github/workflows/ArtifactCleanUp.yml): delete artifacts.
- **⚠ Deprecated ⚠:**
[**CoverageCollection**](.github/workflows/CoverageCollection.yml): Use `UnitTesting`, because is can collect code
coverage too. This avoids code duplication in job templates.
[**BuildTheDocs**](.github/workflows/BuildTheDocs.yml): Use `SphinxDocumentation`, `LaTeXDocumentation` and
`PublishToGitHubPages`. BuildTheDocs isn't maintained anymore.
- [VerifyDocs](.github/workflows/VerifyDocs.yml): extract code examples from the README and test these code snippets.
- Packaging and releasing:
- [Release](.github/workflows/Release.yml): publish GitHub Release.
- [Package](.github/workflows/Package.yml): generate source and wheel packages, and upload them as an artifact.
- [PublishOnPyPI](.github/workflows/PublishOnPyPI.yml): publish source and wheel packages to PyPI.
- [PublishTestResults](.github/workflows/PublishTestResults.yml): publish unit test results through GH action `dorny/test-reporter`.
- Documentation:
- [BuildTheDocs](.github/workflows/BuildTheDocs.yml): build Sphinx documentation with BuildTheDocs, and upload HTML as
an artifact.
- [PublishToGitHubPages](.github/workflows/PublishToGitHubPages.yml): publish HTML documentation to GitHub Pages.
- Cleanup:
- [ArtifactCleanUp](.github/workflows/ArtifactCleanUp.yml): delete artifacts.
### Example pipeline ### Example pipeline
ExamplePipeline.yml is an example Workflow which uses all of the Reusable Workflows. [ExamplePipeline.yml](ExamplePipeline.yml) is an example Workflow which uses all of the Reusable Workflows.
Python package/tool developers can copy it into their repos, in order to use al the reusable workflows straightaway. Python package/tool developers can copy it into their repos, in order to use al the reusable workflows straightaway.
Minimal required modifications are the following: Minimal required modifications are the following:

View File

@@ -1,2 +1,2 @@
wheel ~= 0.45 wheel ~= 0.45
twine ~= 6.1 twine ~= 5.1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 555 KiB

View File

@@ -1,9 +1,9 @@
-r ../requirements.txt -r ../requirements.txt
pyTooling ~= 8.2 pyTooling ~= 8.0
# Enforce latest version on ReadTheDocs # Enforce latest version on ReadTheDocs
sphinx ~= 8.2 sphinx ~= 8.1
docutils ~= 0.21 docutils ~= 0.21
docutils_stubs ~= 0.0.22 docutils_stubs ~= 0.0.22
@@ -11,9 +11,9 @@ docutils_stubs ~= 0.0.22
sphinx_rtd_theme ~= 3.0 sphinx_rtd_theme ~= 3.0
# Sphinx Extenstions # Sphinx Extenstions
sphinxcontrib-mermaid ~= 1.0 sphinxcontrib-mermaid>=0.9.2
autoapi >= 2.0.1 autoapi >= 2.0.1
sphinx_design ~= 0.6.1 sphinx_design ~= 0.6.1
sphinx-copybutton >= 0.5.2 sphinx-copybutton >= 0.5.2
sphinx_autodoc_typehints ~= 3.1 sphinx_autodoc_typehints ~= 2.5
sphinx_reports ~= 0.7 sphinx_reports ~= 0.7

View File

@@ -4,11 +4,11 @@
# percent encoding so that the URL is properly parsed. # percent encoding so that the URL is properly parsed.
.. # Sourcecode link to GitHub .. # Sourcecode link to GitHub
.. |SHIELD:svg:pyTooling-github| image:: https://img.shields.io/badge/pyTooling-Actions-63bf7f?longCache=true&style=flat-square&longCache=true&logo=GitHub .. |SHIELD:svg:pyTooling-github| image:: https://img.shields.io/badge/pyTooling-Actions-63bf7f.svg?longCache=true&style=flat-square&longCache=true&logo=GitHub
:alt: Sourcecode on GitHub :alt: Sourcecode on GitHub
:height: 22 :height: 22
:target: https://GitHub.com/pyTooling/Actions :target: https://GitHub.com/pyTooling/Actions
.. |SHIELD:png:pyTooling-github| image:: https://raster.shields.io/badge/pyTooling-Actions-63bf7f?longCache=true&style=flat-square&longCache=true&logo=GitHub .. |SHIELD:png:pyTooling-github| image:: https://raster.shields.io/badge/pyTooling-Actions-63bf7f.svg?longCache=true&style=flat-square&longCache=true&logo=GitHub
:alt: Sourcecode on GitHub :alt: Sourcecode on GitHub
:height: 22 :height: 22
:target: https://GitHub.com/pyTooling/Actions :target: https://GitHub.com/pyTooling/Actions
@@ -18,7 +18,7 @@
:alt: Code license :alt: Code license
:height: 22 :height: 22
:target: Code-License.html :target: Code-License.html
.. |SHIELD:png:pyTooling-src-license| image:: https://raster.shields.io/pypi/l/pyTooling?longCache=true&style=flat-square&logo=Apache&label=code .. |SHIELD:png:pyTooling-src-license| image:: https://img.shields.io/pypi/l/pyTooling?longCache=true&style=flat-square&logo=Apache&label=code
:alt: Code license :alt: Code license
:height: 22 :height: 22
:target: https://GitHub.com/pyTooling/Actions/blob/main/LICENSE.md :target: https://GitHub.com/pyTooling/Actions/blob/main/LICENSE.md
@@ -64,11 +64,11 @@
:target: https://pyTooling.github.io/pyTooling/ :target: https://pyTooling.github.io/pyTooling/
.. # Gitter .. # Gitter
.. |SHIELD:svg:pyTooling-gitter| image:: https://img.shields.io/badge/chat-on%20gitter-4db797?longCache=true&style=flat-square&logo=gitter&logoColor=e8ecef .. |SHIELD:svg:pyTooling-gitter| image:: https://img.shields.io/badge/chat-on%20gitter-4db797.svg?longCache=true&style=flat-square&logo=gitter&logoColor=e8ecef
:alt: Documentation License :alt: Documentation License
:height: 22 :height: 22
:target: https://gitter.im/hdl/community :target: https://gitter.im/hdl/community
.. |SHIELD:png:pyTooling-gitter| image:: https://raster.shields.io/badge/chat-on%20gitter-4db797?longCache=true&style=flat-square&logo=gitter&logoColor=e8ecef .. |SHIELD:png:pyTooling-gitter| image:: https://raster.shields.io/badge/chat-on%20gitter-4db797.svg?longCache=true&style=flat-square&logo=gitter&logoColor=e8ecef
:alt: Documentation License :alt: Documentation License
:height: 22 :height: 22
:target: https://gitter.im/hdl/community :target: https://gitter.im/hdl/community

View File

@@ -11,7 +11,7 @@
# # # #
# License: # # License: #
# ==================================================================================================================== # # ==================================================================================================================== #
# Copyright 2017-2025 Patrick Lehmann - Bötzingen, Germany # # Copyright 2017-2024 Patrick Lehmann - Bötzingen, Germany #
# # # #
# Licensed under the Apache License, Version 2.0 (the "License"); # # Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. # # you may not use this file except in compliance with the License. #
@@ -34,7 +34,7 @@ A module for a set of dummy classes.
__author__ = "Patrick Lehmann" __author__ = "Patrick Lehmann"
__email__ = "Paebbels@gmail.com" __email__ = "Paebbels@gmail.com"
__copyright__ = "2017-2025, Patrick Lehmann" __copyright__ = "2017-2024, Patrick Lehmann"
__license__ = "Apache License, Version 2.0" __license__ = "Apache License, Version 2.0"
__version__ = "0.4.4" __version__ = "0.4.4"
__keywords__ = ["GitHub Actions"] __keywords__ = ["GitHub Actions"]

View File

@@ -11,7 +11,7 @@
# # # #
# License: # # License: #
# ==================================================================================================================== # # ==================================================================================================================== #
# Copyright 2017-2025 Patrick Lehmann - Bötzingen, Germany # # Copyright 2017-2024 Patrick Lehmann - Bötzingen, Germany #
# # # #
# Licensed under the Apache License, Version 2.0 (the "License"); # # Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. # # you may not use this file except in compliance with the License. #
@@ -34,7 +34,7 @@ A module for a set of dummy classes.
__author__ = "Patrick Lehmann" __author__ = "Patrick Lehmann"
__email__ = "Paebbels@gmail.com" __email__ = "Paebbels@gmail.com"
__copyright__ = "2017-2025, Patrick Lehmann" __copyright__ = "2017-2024, Patrick Lehmann"
__license__ = "Apache License, Version 2.0" __license__ = "Apache License, Version 2.0"
__version__ = "0.14.8" __version__ = "0.14.8"
__keywords__ = ["GitHub Actions"] __keywords__ = ["GitHub Actions"]

View File

@@ -1,8 +1,8 @@
[build-system] [build-system]
requires = [ requires = [
"setuptools ~= 75.8", "setuptools ~= 75.5",
"wheel ~= 0.45", "wheel ~= 0.45",
"pyTooling ~= 8.2" "pyTooling ~= 8.0"
] ]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"
@@ -20,9 +20,6 @@ show_error_codes = true
namespace_packages = true namespace_packages = true
html_report = "report/typing" html_report = "report/typing"
[tool.pytest]
junit_xml = "report/unit/TestReportSummary.xml"
[tool.pytest.ini_options] [tool.pytest.ini_options]
addopts = "--tb=native" addopts = "--tb=native"
# Don't set 'python_classes = *' otherwise, pytest doesn't search for classes # Don't set 'python_classes = *' otherwise, pytest doesn't search for classes
@@ -33,7 +30,6 @@ filterwarnings = [
"error::DeprecationWarning", "error::DeprecationWarning",
"error::PendingDeprecationWarning" "error::PendingDeprecationWarning"
] ]
junit_logging = "all"
[tool.interrogate] [tool.interrogate]
color = true color = true

View File

@@ -1 +1 @@
pyTooling ~= 8.2 pyTooling ~= 8.0

View File

@@ -88,7 +88,7 @@ if ($build)
rm -Force .\build\bdist.win-amd64 rm -Force .\build\bdist.win-amd64
rm -Force .\build\lib rm -Force .\build\lib
Write-Host -ForegroundColor Yellow "[live][BUILD] Building $PackageName package as wheel ..." Write-Host -ForegroundColor Yellow "[live][BUILD] Building $PackageName package as wheel ..."
py -3.13 -m build --wheel py -3.12 -m build --wheel
Write-Host -ForegroundColor Yellow "[live][BUILD] Building wheel finished" Write-Host -ForegroundColor Yellow "[live][BUILD] Building wheel finished"
} }
@@ -102,9 +102,9 @@ if ($install)
} }
else else
{ Write-Host -ForegroundColor Cyan "[ADMIN][UNINSTALL] Uninstalling $PackageName ..." { Write-Host -ForegroundColor Cyan "[ADMIN][UNINSTALL] Uninstalling $PackageName ..."
py -3.13 -m pip uninstall -y $PackageName py -3.12 -m pip uninstall -y $PackageName
Write-Host -ForegroundColor Cyan "[ADMIN][INSTALL] Installing $PackageName from wheel ..." Write-Host -ForegroundColor Cyan "[ADMIN][INSTALL] Installing $PackageName from wheel ..."
py -3.13 -m pip install .\dist\$PackageName-8.1.0-py3-none-any.whl py -3.12 -m pip install .\dist\$PackageName-6.7.0-py3-none-any.whl
Write-Host -ForegroundColor Cyan "[ADMIN][INSTALL] Closing window in 5 seconds ..." Write-Host -ForegroundColor Cyan "[ADMIN][INSTALL] Closing window in 5 seconds ..."
Start-Sleep -Seconds 5 Start-Sleep -Seconds 5

View File

@@ -11,7 +11,7 @@
# # # #
# License: # # License: #
# ==================================================================================================================== # # ==================================================================================================================== #
# Copyright 2017-2025 Patrick Lehmann - Bötzingen, Germany # # Copyright 2017-2024 Patrick Lehmann - Bötzingen, Germany #
# # # #
# Licensed under the Apache License, Version 2.0 (the "License"); # # Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. # # you may not use this file except in compliance with the License. #

View File

@@ -11,7 +11,7 @@
# # # #
# License: # # License: #
# ==================================================================================================================== # # ==================================================================================================================== #
# Copyright 2017-2025 Patrick Lehmann - Bötzingen, Germany # # Copyright 2017-2024 Patrick Lehmann - Bötzingen, Germany #
# # # #
# Licensed under the Apache License, Version 2.0 (the "License"); # # Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. # # you may not use this file except in compliance with the License. #

View File

@@ -8,6 +8,6 @@ pytest ~= 8.3
pytest-cov ~= 6.0 pytest-cov ~= 6.0
# Static Type Checking # Static Type Checking
mypy ~= 1.15 mypy ~= 1.13
typing_extensions ~= 4.12 typing_extensions ~= 4.12
lxml ~= 5.3 lxml ~= 5.3

View File

@@ -11,7 +11,7 @@
# # # #
# License: # # License: #
# ==================================================================================================================== # # ==================================================================================================================== #
# Copyright 2017-2025 Patrick Lehmann - Bötzingen, Germany # # Copyright 2017-2024 Patrick Lehmann - Bötzingen, Germany #
# # # #
# Licensed under the Apache License, Version 2.0 (the "License"); # # Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. # # you may not use this file except in compliance with the License. #

View File

@@ -11,7 +11,7 @@
# # # #
# License: # # License: #
# ==================================================================================================================== # # ==================================================================================================================== #
# Copyright 2017-2025 Patrick Lehmann - Bötzingen, Germany # # Copyright 2017-2024 Patrick Lehmann - Bötzingen, Germany #
# # # #
# Licensed under the Apache License, Version 2.0 (the "License"); # # Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. # # you may not use this file except in compliance with the License. #