Compare commits

...

13 Commits

Author SHA1 Message Date
Patrick Lehmann
d6342484cd v5.4.0 2025-08-29 22:14:18 +02:00
Patrick Lehmann
ba3d82668e Allow configuration of JUnit dialects. 2025-08-29 21:57:36 +02:00
Patrick Lehmann
4b0b103c5f v5.3.0 2025-08-29 07:49:24 +02:00
Patrick Lehmann
ba6f55dd57 Support cross-repository pull request runs from forks. 2025-08-28 22:36:35 +02:00
Patrick Lehmann
d48de1d02d v5.2.0 2025-08-17 13:21:18 +02:00
Patrick Lehmann
744f08b9bf Tag release only if not a scheduled CI run. 2025-08-17 10:44:31 +02:00
Patrick Lehmann
fb546453ae Bumped dependencies. 2025-08-13 01:09:26 +02:00
Patrick Lehmann
1a3ba03626 Check pytest outcome. 2025-07-27 22:32:42 +02:00
Patrick Lehmann
4d2d4c47fc Upload merged unit tests as artifact even if some test cases failed. 2025-07-16 08:26:01 +02:00
Patrick Lehmann
962827936c Build Sphinx documentation, even if some testcases have failed. 2025-07-15 22:35:13 +02:00
Patrick Lehmann
2307b526df v5.1.0 2025-06-20 02:09:09 +02:00
Patrick Lehmann
f3e2e42ae3 Handle replacement placeholders, if no substitution exists. 2025-06-20 02:02:46 +02:00
Patrick Lehmann
2f7fa88c36 Compute and verify SHA256 checksums. 2025-06-19 17:44:31 +02:00
24 changed files with 152 additions and 61 deletions

View File

@@ -86,10 +86,10 @@ jobs:
steps:
- name: ⏬ Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: 📥 Download artifacts '${{ inputs.wheel }}' from 'Package' job
uses: pyTooling/download-artifact@v4
uses: pyTooling/download-artifact@v5
with:
name: ${{ inputs.wheel }}
path: install

View File

@@ -41,7 +41,7 @@ jobs:
run: printf "::warning title=%s::%s\n" "Deprecated" "'BuildTheDocs.yml' is not maintained anymore. Please switch to 'SphinxDocumentation.yml', 'LaTeXDocumentation.yml' and 'ExtractConfiguration.yml'."
- name: ⏬ Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: 🛳️ Build documentation
uses: buildthedocs/btd@v0

View File

@@ -50,7 +50,7 @@ jobs:
runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
steps:
- name: ⏬ Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: 🐍 Setup Python ${{ inputs.python_version }}
uses: actions/setup-python@v5

View File

@@ -245,6 +245,7 @@ jobs:
- ConfigParams
- UnitTestingParams
- UnitTesting
if: success() || failure()
with:
# coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}
# coverage_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }}
@@ -267,6 +268,7 @@ jobs:
- ConfigParams
- UnitTestingParams
- UnitTesting
if: success() || failure()
with:
testsuite-summary-name: ${{ needs.ConfigParams.outputs.package_fullname }}
merged_junit_filename: ${{ needs.ConfigParams.outputs.unittest_merged_report_xml_filename }}
@@ -291,6 +293,7 @@ jobs:
- PublishTestResults
- PublishCoverageResults
# - VerifyDocs
if: success() || failure()
with:
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
coverage_report_json_directory: ${{ needs.ConfigParams.outputs.coverage_report_json_directory }}
@@ -305,7 +308,7 @@ jobs:
- UnitTestingParams
- PublishCoverageResults
- PublishTestResults
if: inputs.cleanup == 'true'
if: ( success() || failure() ) && inputs.cleanup == 'true'
with:
sqlite_coverage_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}-
xml_unittest_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}-
@@ -343,7 +346,7 @@ jobs:
# - StaticTypeCheck
- Package
- PublishToGitHubPages
if: needs.Prepare.outputs.is_release_commit
if: needs.Prepare.outputs.is_release_commit && github.event_name != 'schedule'
permissions:
contents: write # required for create tag
actions: write # required for trigger workflow

View File

@@ -75,7 +75,7 @@ jobs:
run: printf "::warning title=%s::%s\n" "Deprecated" "'CoverageCollection.yml' is not maintained anymore. Please switch to 'UnitTesting.yml', 'PublishCoverageResults.yml' and 'PublishTestResults.yml'."
- name: ⏬ Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
lfs: true
submodules: true

View File

@@ -123,7 +123,7 @@ jobs:
steps:
- name: ⏬ Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: 🐍 Setup Python ${{ inputs.python_version }}
uses: actions/setup-python@v5

View File

@@ -53,7 +53,7 @@ jobs:
steps:
- name: 📥 Download artifacts '${{ inputs.wheel }}' from 'Package' job
uses: pyTooling/download-artifact@v4
uses: pyTooling/download-artifact@v5
with:
name: ${{ inputs.wheel }}
path: install

View File

@@ -50,7 +50,7 @@ jobs:
runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
steps:
- name: 📥 Download artifacts '${{ inputs.latex_artifact }}' from 'SphinxDocumentation' job
uses: pyTooling/download-artifact@v4
uses: pyTooling/download-artifact@v5
with:
name: ${{ inputs.latex_artifact }}
path: latex

View File

@@ -101,7 +101,7 @@ jobs:
steps:
- name: ⏬ Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
# The command 'git describe' (used for version) needs the history.
fetch-depth: 0

View File

@@ -53,7 +53,7 @@ jobs:
steps:
- name: ⏬ Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
lfs: true
submodules: true

View File

@@ -103,11 +103,11 @@ jobs:
version: ${{ steps.Classify.outputs.version || steps.FindPullRequest.outputs.pr_version }}
# release_version: ${{ steps.FindPullRequest.outputs.release_version }}
pr_title: ${{ steps.FindPullRequest.outputs.pr_title }}
pr_number: ${{ steps.FindPullRequest.outputs.pr_number }}
pr_number: ${{ steps.Classify.outputs.pr_number || steps.FindPullRequest.outputs.pr_number }}
steps:
- name: ⏬ Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
# The command 'git describe' (used for version) needs the history.
fetch-depth: 0
@@ -144,6 +144,7 @@ jobs:
ref_kind="unknown"
branch=""
tag=""
pr_number=""
version=""
if [[ "${ref:0:11}" == "refs/heads/" ]]; then
@@ -225,6 +226,13 @@ jobs:
printf "::error title=RexExpCheck::Tag name '%s' doesn't conform to regexp '%s' nor '%s'.\n" "${tag}" "${NIGHTLY_TAG_PATTERN}" "${RELEASE_TAG_PATTERN}"
exit 1
fi
elif [[ "${ref:0:10}" == "refs/pull/" ]]; then
ref_kind="pullrequest"
pr_number=${ref:11}
pr_number=${pr_number%%/*}
printf "Pull Request check:\n"
printf " Number: %s\n" "${pr_number}"
else
printf "${ANSI_LIGHT_RED}Unknown Git reference '%s'.${ANSI_NOCOLOR}\n" "${{ github.ref }}"
printf "::error title=Classify Commit::Unknown Git reference '%s'.\n" "${{ github.ref }}"
@@ -243,6 +251,7 @@ jobs:
ref_kind=${ref_kind}
branch=${branch}
tag=${tag}
pr_number=${pr_number}
version=${version}
EOF
@@ -327,8 +336,10 @@ jobs:
printf "ref_kind: %s\n" "${{ steps.Classify.outputs.ref_kind }}"
printf "branch: %s\n" "${{ steps.Classify.outputs.branch }}"
printf "tag: %s\n" "${{ steps.Classify.outputs.tag }}"
printf "version from tag: %s\n" "${{ steps.Classify.outputs.version }}"
printf "version from pr: %s\n" "${{ steps.FindPullRequest.outputs.pr_version }}"
printf "version: %s\n" "${{ steps.Classify.outputs.version || steps.FindPullRequest.outputs.pr_version }}"
printf " from tag: %s\n" "${{ steps.Classify.outputs.version }}"
printf " from pr: %s\n" "${{ steps.FindPullRequest.outputs.pr_version }}"
printf "pr title: %s\n" "${{ steps.FindPullRequest.outputs.pr_title }}"
printf "pr number: %s\n" "${{ steps.FindPullRequest.outputs.pr_number }}"
printf "pr number: %s\n" "${{ steps.Classify.outputs.pr_number || steps.FindPullRequest.outputs.pr_number }}"
printf " from merge: %s\n" "${{ steps.Classify.outputs.pr_number }}"
printf " from pr: %s\n" "${{ steps.FindPullRequest.outputs.pr_number }}"

View File

@@ -109,13 +109,13 @@ jobs:
steps:
- name: ⏬ Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
lfs: true
submodules: true
- name: 📥 Download Artifacts
uses: pyTooling/download-artifact@v4
uses: pyTooling/download-artifact@v5
with:
pattern: ${{ inputs.coverage_artifacts_pattern }}
path: artifacts

View File

@@ -56,7 +56,7 @@ jobs:
steps:
- name: 📥 Download artifacts '${{ inputs.artifact }}' from 'Package' job
uses: pyTooling/download-artifact@v4
uses: pyTooling/download-artifact@v5
with:
name: ${{ inputs.artifact }}
path: dist

View File

@@ -133,7 +133,7 @@ jobs:
steps:
- name: ⏬ Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
# The command 'git describe' (used for version) needs the history.
fetch-depth: 0
@@ -290,6 +290,8 @@ jobs:
# Inline description
if [[ -s __DESCRIPTION__.md ]]; then
NOTES="${NOTES//%%DESCRIPTION%%/$(<__DESCRIPTION__.md)}"
else
NOTES="${NOTES//%%DESCRIPTION%%/}"
fi
# Inline PullRequest and increase headline levels
@@ -310,11 +312,17 @@ jobs:
;;
esac
done
else
while [[ "${NOTES}" =~ %%(PULLREQUEST(\+[0-3])?)%% ]]; do
NOTES="${NOTES//${BASH_REMATCH[0]}/}"
done
fi
# inline Footer
if [[ -s __FOOTER__.md ]]; then
NOTES="${NOTES//%%FOOTER%%/$(<__FOOTER__.md)}"
else
NOTES="${NOTES//%%FOOTER%%/}"
fi
# Apply replacements
@@ -525,6 +533,8 @@ jobs:
declare -A downloadedArtifacts
# A dictionary to check for duplicate asset files in release
declare -A assetFilenames
# A dictionary of SHA256 checksums
declare -A sha256Checksums
while IFS=$'\r\n' read -r assetLine; do
if [[ "${assetLine}" == "" || "${assetLine:0:1}" == "#" ]]; then
continue
@@ -552,7 +562,7 @@ jobs:
asset="$(Replace "${asset}")"
title="$(Replace "${title}")"
printf "Publish asset '%s' from artifact '%s' with title '%s'\n" "${asset}" "${artifact}" "${title}"
printf "${ANSI_LIGHT_BLUE}Publish asset '%s' from artifact '%s' with title '%s'${ANSI_NOCOLOR}\n" "${asset}" "${artifact}" "${title}"
printf " Checked asset for duplicates ... "
if [[ -n "${assetFilenames[$asset]}" ]]; then
printf "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}\n"
@@ -566,7 +576,7 @@ jobs:
# Download artifact by artifact name
if [[ -n "${downloadedArtifacts[$artifact]}" ]]; then
printf " downloading '%s' ... ${ANSI_LIGHT_YELLOW}[SKIPPED]${ANSI_NOCOLOR}\n" "${artifact}"
printf " downloading artifact '%s' ... ${ANSI_LIGHT_YELLOW}[SKIPPED]${ANSI_NOCOLOR}\n" "${artifact}"
else
echo " downloading '${artifact}' ... "
printf " gh run download $GITHUB_RUN_ID --dir \"%s\" --name \"%s\" " "${artifact}" "${artifact}"
@@ -701,6 +711,11 @@ jobs:
continue
fi
printf " compute SHA256 checksum of '${uploadFile}' ... "
sha256=$(sha256sum -b ${uploadFile} | cut -d " " -f1)
sha256Checksums[$asset]="sha256:${sha256}"
printf "${ANSI_LIGHT_BLUE}${sha256}${ANSI_NOCOLOR}\n"
# Add asset to JSON inventory
if [[ "${{ inputs.inventory-json }}" != "" ]]; then
if [[ "${categories}" != "${title}" ]]; then
@@ -708,8 +723,9 @@ jobs:
category=""
jsonEntry=$(jq -c -n \
--arg title "${title}" \
--arg sha256 "${sha256}" \
--arg file "${uploadFile#*/}" \
'{"file": $file, "title": $title}' \
'{"file": $file, "sha256": $sha256, "title": $title}' \
)
while [[ "${categories}" != "${category}" ]]; do
@@ -733,6 +749,20 @@ jobs:
gh release upload ${{ inputs.tag }} "${uploadFile}#${title}" --clobber
if [[ $? -eq 0 ]]; then
printf "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}\n"
printf " checking assets SHA256 checksum ... \n"
ghSHA256=$(gh release view --json assets --jq ".assets[] | select(.name == \"${asset}\") | .digest" ${{ inputs.tag }})
if [[ "${ghSHA256}" == "${sha256Checksums[$asset]}" ]]; then
printf "${ANSI_LIGHT_GREEN}[PASSED]${ANSI_NOCOLOR}\n"
else
printf "${ANSI_LIGHT_RED}[FAILED]${ANSI_NOCOLOR}\n"
printf " ${ANSI_LIGHT_RED}SHA256 checksum compare failed.${ANSI_NOCOLOR}\n"
printf " ${ANSI_LIGHT_RED}Local: %s${ANSI_NOCOLOR}\n" "${sha256Checksums[$asset]}"
printf " ${ANSI_LIGHT_RED}GitHub: %s${ANSI_NOCOLOR}\n" "${ghSHA256}"
printf "::error title=%s::%s\n" "ChecksumError" "SHA256 checksum compare failed. Local=${sha256Checksums[$asset]} GitHub=${ghSHA256}"
ERRORS=$((ERRORS + 1))
continue
fi
else
printf "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}\n"
printf " ${ANSI_LIGHT_RED}Couldn't upload asset '%s' from '%s' to release '%s'.${ANSI_NOCOLOR}\n" "${asset}" "${uploadFile}" "${{ inputs.tag }}"

View File

@@ -44,6 +44,16 @@ on:
required: false
default: ''
type: string
merge-input-dialect:
description: 'JUnit dialect used to load and parse inputs for merging.'
required: false
default: 'pyTest-JUnit'
type: string
merge-output-dialect:
description: 'JUnit dialect used for writing the merged report.'
required: false
default: 'pyTest-JUnit'
type: string
additional_merge_args:
description: 'Additional merging arguments.'
required: false
@@ -92,10 +102,10 @@ jobs:
steps:
- name: ⏬ Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: 📥 Download Artifacts
uses: pyTooling/download-artifact@v4
uses: pyTooling/download-artifact@v5
with:
pattern: ${{ inputs.unittest_artifacts_pattern }}
path: artifacts
@@ -116,13 +126,18 @@ jobs:
- name: 🔁 Merge JUnit Unit Test Summaries
run: |
pyedaa-reports -v unittest "--name=${{ inputs.testsuite-summary-name }}" "--merge=pyTest-JUnit:junit/*.xml" ${{ inputs.additional_merge_args }} "--output=pyTest-JUnit:${{ inputs.merged_junit_filename }}"
if [[ -n "${{ inputs.testsuite-summary-name }}" ]]; then
name="\"--name=${{ inputs.testsuite-summary-name }}\""
fi
pyedaa-reports -v unittest $name "--merge=${{ inputs.merge-input-dialect }}:junit/*.xml" ${{ inputs.additional_merge_args }} "--output=${{ inputs.merge-output-dialect }}:${{ inputs.merged_junit_filename }}"
printf "%s\n" "cat ${{ inputs.merged_junit_filename }}"
cat ${{ inputs.merged_junit_filename }}
- name: 📊 Publish Unit Test Results
uses: dorny/test-reporter@v2
id: test-reporter
if: ( inputs.dorny == 'true' || inputs.publish == 'true' ) && inputs.report_title != ''
continue-on-error: true
with:
name: ${{ inputs.report_title }}
path: ${{ inputs.merged_junit_filename }}
@@ -140,14 +155,6 @@ jobs:
flags: ${{ inputs.codecov_flags }}
fail_ci_if_error: true
- name: Generate error messages
run: |
if [[ "${{ steps.codecov.outcome }}" == "failure" ]]; then
printf "::error title=%s::%s\n" "Publish Unit Test Results / Codecov" "Failed to publish unittest results."
else
printf "Codecov: No errors to report.\n"
fi
- name: 📤 Upload merged 'JUnit Test Summary' artifact
uses: pyTooling/upload-artifact@v4
if: inputs.merged_junit_artifact != ''
@@ -157,3 +164,24 @@ jobs:
if-no-files-found: error
retention-days: 1
investigate: true
- name: Generate error messages
run: |
exitCode=0
if [[ "${{ steps.test-reporter.outcome }}" == "failure" ]]; then
printf "❌ Dorney/Test-Reporter: %s\n" "Failed to publish unittest results."
printf "::error title=%s::%s\n" "Dorney/Test-Reporter" "Failed to publish unittest results."
exitCode=1
else
printf "✅ Dorney/Test-Reporter: No errors to report.\n"
fi
if [[ "${{ steps.codecov.outcome }}" == "failure" ]]; then
printf "❌ CodeCov: %s\n" "Failed to publish unittest and code coverage results."
printf "::error title=%s::%s\n" "CodeCov" "Failed to publish unittest and code coverage results."
exitCode=1
else
printf "✅ CodeCov: No errors to report.\n"
fi
exit $exitCode

View File

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

View File

@@ -81,7 +81,7 @@ jobs:
steps:
- name: ⏬ Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
lfs: true
submodules: true
@@ -100,7 +100,7 @@ jobs:
python -m pip install --disable-pip-version-check ${{ inputs.requirements }}
- name: 📥 Download artifacts '${{ inputs.unittest_xml_artifact }}' from 'Unittesting' job
uses: pyTooling/download-artifact@v4
uses: pyTooling/download-artifact@v5
if: inputs.unittest_xml_artifact != ''
with:
name: ${{ inputs.unittest_xml_artifact }}
@@ -108,7 +108,7 @@ jobs:
investigate: true
- name: 📥 Download artifacts '${{ inputs.coverage_json_artifact }}' from 'PublishCoverageResults' job
uses: pyTooling/download-artifact@v4
uses: pyTooling/download-artifact@v5
if: inputs.coverage_json_artifact != ''
with:
name: ${{ inputs.coverage_json_artifact }}
@@ -140,7 +140,7 @@ jobs:
steps:
- name: ⏬ Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
lfs: true
submodules: true
@@ -159,7 +159,7 @@ jobs:
python -m pip install --disable-pip-version-check ${{ inputs.requirements }}
- name: 📥 Download artifacts '${{ inputs.unittest_xml_artifact }}' from 'Unittesting' job
uses: pyTooling/download-artifact@v4
uses: pyTooling/download-artifact@v5
if: inputs.unittest_xml_artifact != ''
with:
name: ${{ inputs.unittest_xml_artifact }}
@@ -167,7 +167,7 @@ jobs:
investigate: true
- name: 📥 Download artifacts '${{ inputs.coverage_json_artifact }}' from 'PublishCoverageResults' job
uses: pyTooling/download-artifact@v4
uses: pyTooling/download-artifact@v5
if: inputs.coverage_json_artifact != ''
with:
name: ${{ inputs.coverage_json_artifact }}

View File

@@ -72,7 +72,7 @@ jobs:
steps:
- name: ⏬ Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: 🐍 Setup Python ${{ inputs.python_version }}
uses: actions/setup-python@v5

View File

@@ -3,7 +3,7 @@
# Unai Martinez-Corral #
# #
# ==================================================================================================================== #
# Copyright 2020-2024 The pyTooling Authors #
# Copyright 2020-2025 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. #
@@ -45,7 +45,7 @@ jobs:
env:
DOCKER_BUILDKIT: 1
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build container image
run: docker build -t ghcr.io/pytooling/releaser -f releaser/Dockerfile releaser
@@ -62,7 +62,7 @@ jobs:
Composite:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- run: printf "%s\n" "Build some tool and generate some (versioned) artifacts" > artifact-$(date -u +"%Y-%m-%dT%H-%M-%SZ").txt
@@ -122,7 +122,7 @@ jobs:
- Composite
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- run: printf "%s\n" "Build some tool and generate some (versioned) artifacts" > artifact-$(date -u +"%Y-%m-%dT%H-%M-%SZ").txt

View File

@@ -161,7 +161,7 @@ jobs:
steps:
- name: ⏬ Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
lfs: true
submodules: true
@@ -342,6 +342,7 @@ jobs:
# Run pytests
- name: ✅ Run unit tests (Ubuntu/macOS)
id: pytest_bash
if: matrix.system != 'windows'
continue-on-error: true
run: |
@@ -359,6 +360,7 @@ jobs:
fi
- name: ✅ Run unit tests (Windows)
id: pytest_posh
if: matrix.system == 'windows'
continue-on-error: true
run: |
@@ -376,16 +378,19 @@ jobs:
}
- name: Convert coverage to XML format (Cobertura)
id: convert_xml
if: inputs.coverage_xml_artifact != ''
continue-on-error: true
run: coverage xml --data-file=.coverage
- name: Convert coverage to JSON format
id: convert_json
if: inputs.coverage_json_artifact != ''
continue-on-error: true
run: coverage json --data-file=.coverage
- name: Convert coverage to HTML format
id: convert_html
if: inputs.coverage_html_artifact != ''
continue-on-error: true
run: |
@@ -427,7 +432,7 @@ jobs:
retention-days: 1
- name: 📤 Upload 'Coverage XML Report' artifact
if: inputs.coverage_xml_artifact != ''
if: inputs.coverage_xml_artifact != '' && steps.convert_xml.outcome == 'success'
continue-on-error: true
uses: pyTooling/upload-artifact@v4
with:
@@ -437,7 +442,7 @@ jobs:
retention-days: 1
- name: 📤 Upload 'Coverage JSON Report' artifact
if: inputs.coverage_json_artifact != ''
if: inputs.coverage_json_artifact != '' && steps.convert_json.outcome == 'success'
continue-on-error: true
uses: pyTooling/upload-artifact@v4
with:
@@ -447,7 +452,7 @@ jobs:
retention-days: 1
- name: 📤 Upload 'Coverage HTML Report' artifact
if: inputs.coverage_html_artifact != ''
if: inputs.coverage_html_artifact != '' && steps.convert_html.outcome == 'success'
continue-on-error: true
uses: pyTooling/upload-artifact@v4
with:
@@ -456,3 +461,17 @@ jobs:
path: '*'
if-no-files-found: error
retention-days: 1
- name: Generate error messages
shell: bash
run: |
exitCode=0
if [[ "${{ steps.pytest_bash.outcome }}" == "failure" || "${{ steps.pytest_posh.outcome }}" == "failure" ]]; then
printf "❌ pytest: %s\n" "Error in pytest execution."
printf "::error title=%s::%s\n" "pytest" "Error in pytest execution."
exitCode=1
else
printf "✅ pytest: No errors.\n"
fi
exit $exitCode

View File

@@ -44,7 +44,7 @@ jobs:
steps:
- name: ⏬ Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: 🐍 Setup Python
uses: actions/setup-python@v5

View File

@@ -85,7 +85,7 @@ The following block shows a minimal YAML workflow file:
steps:
# Clone repository
- uses: actions/checkout@v4
- uses: actions/checkout@v5
# Build your application, tool, artifacts, etc.
- name: Build

View File

@@ -79,7 +79,7 @@ jobs:
steps:
# Clone repository
- uses: actions/checkout@v4
- uses: actions/checkout@v5
# Build your application, tool, artifacts, etc.
- name: Build

View File

@@ -1,13 +1,13 @@
-r ../requirements.txt
# Coverage collection
Coverage ~= 7.9
Coverage ~= 7.10
# Test Runner
pytest ~= 8.4
pytest-cov ~= 6.2
# Static Type Checking
mypy ~= 1.16
typing_extensions ~= 4.13
lxml ~= 5.4
mypy ~= 1.17
typing_extensions ~= 4.14
lxml ~= 6.0