From 4406abe78831a53d8c0af61a803dcd88e398723c Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Thu, 25 Apr 2024 07:20:29 +0200 Subject: [PATCH] Merge unit test results using pyEDAA.Reports. --- .github/workflows/Parameters.yml | 2 +- .github/workflows/PublishTestResults.yml | 22 ++++++---------------- .github/workflows/_Checking_Pipeline.yml | 2 +- dist/requirements.txt | 2 ++ 4 files changed, 10 insertions(+), 18 deletions(-) create mode 100644 dist/requirements.txt diff --git a/.github/workflows/Parameters.yml b/.github/workflows/Parameters.yml index 620b706..cc997fd 100644 --- a/.github/workflows/Parameters.yml +++ b/.github/workflows/Parameters.yml @@ -138,7 +138,7 @@ jobs: if currentAlphaVersion in versions: print(f"::notice title=Experimental::Python {currentAlphaVersion} ({currentAlphaRelease}) is a pre-release.") for disable in disabled: - print(f"::warning title=Disabled Python Job::System '{disable}' temporary disabled.") + print(f"::warning title=Disabled Python Job::System '{disable}' temporarily disabled.") # see https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json data = { diff --git a/.github/workflows/PublishTestResults.yml b/.github/workflows/PublishTestResults.yml index fd9391a..3fca84c 100644 --- a/.github/workflows/PublishTestResults.yml +++ b/.github/workflows/PublishTestResults.yml @@ -48,7 +48,7 @@ jobs: - name: 🔧 Install junitparser run: | - python -m pip install --disable-pip-version-check -U junitparser + python -m pip install --disable-pip-version-check -U pyEDAA.Reports - name: Move JUnit files and collect them all to junit/ run: | @@ -57,26 +57,16 @@ jobs: tree -a junit - name: 🔁 Merge JUnit Unit Test Summaries - shell: python run: | - from pathlib import Path - from junitparser import JUnitXml - - junitDirectory = Path("junit") - junitXml = None - for file in junitDirectory.iterdir(): - if junitXml is None: - junitXml = JUnitXml.fromfile(file) - else: - junitXml += JUnitXml.fromfile(file) - - junitXml.write(junitDirectory / "merged.xml") + pyedaa-reports merge-unittest -v --junit "junit/*.xml" + echo "cat Unittesting.xml" + cat Unittesting.xml - name: 📊 Publish Unit Test Results uses: dorny/test-reporter@v1 with: name: Unit Test Results - path: junit/merged.xml + path: Unittesting.xml reporter: java-junit - name: 📤 Upload merged 'JUnit Test Summary' artifact @@ -84,6 +74,6 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{ inputs.merged_junit_artifact }} - path: junit/merged.xml + path: Unittesting.xml if-no-files-found: error retention-days: 1 diff --git a/.github/workflows/_Checking_Pipeline.yml b/.github/workflows/_Checking_Pipeline.yml index 77b2179..0edbc17 100644 --- a/.github/workflows/_Checking_Pipeline.yml +++ b/.github/workflows/_Checking_Pipeline.yml @@ -84,7 +84,7 @@ jobs: codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }} PublishTestResults: - uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@r1 + uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@dev needs: - UnitTesting - PlatformTesting diff --git a/dist/requirements.txt b/dist/requirements.txt new file mode 100644 index 0000000..5be2dd0 --- /dev/null +++ b/dist/requirements.txt @@ -0,0 +1,2 @@ +wheel ~= 0.43 +twine ~= 5.0