Avoid test failure artifact name clash

This commit is contained in:
Nyall Dawson 2025-08-26 14:22:39 +10:00
parent 831a471b30
commit ad0b82dde9
2 changed files with 6 additions and 5 deletions

View File

@ -424,7 +424,7 @@ jobs:
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.distro }}-qt${{ matrix.qt-version }}
name: test-results-${{ matrix.distro }}-qt${{ matrix.qt-version }}-${{ matrix.test-batch }}
path: qgis_test_report
clang-tidy:

View File

@ -15,6 +15,7 @@ jobs:
matrix:
qt-version: [ 5, 6 ]
distro: ['fedora', 'ubuntu']
test-batch: ['ALL_BUT_PROVIDERS', 'POSTGRES', 'HANA', 'SQLSERVER', 'ORACLE']
permissions:
pull-requests: write
@ -32,7 +33,7 @@ jobs:
run_id: context.payload.workflow_run.id,
});
let matchArtifacts = allArtifacts.data.artifacts.filter((artifact) => {
return artifact.name == "test-results-${{ matrix.distro }}-qt${{ matrix.qt-version }}"
return artifact.name == "test-results-${{ matrix.distro }}-qt${{ matrix.qt-version }}-${{ matrix.test-batch }}"
});
if (matchArtifacts.length>0)
{
@ -43,7 +44,7 @@ jobs:
archive_format: 'zip',
});
let fs = require('fs');
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/test-results-${{ matrix.distro }}-qt${{ matrix.qt-version }}.zip`, Buffer.from(download.data));
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/test-results-${{ matrix.distro }}-qt${{ matrix.qt-version }}-${{ matrix.test-batch }}.zip`, Buffer.from(download.data));
core.setOutput('artifact_id', matchArtifacts[0].id);
}
else
@ -53,7 +54,7 @@ jobs:
- name: 'Unzip artifact'
if: fromJSON(steps.download_artifact.outputs.artifact_id) > 0
run: unzip -j test-results-${{ matrix.distro }}-qt${{ matrix.qt-version }}.zip *.md pr_number git_commit || ( e=$? && if [ $e -ne 11 ]; then exit $e; fi )
run: unzip -j test-results-${{ matrix.distro }}-qt${{ matrix.qt-version }}-${{ matrix.test-batch }}.zip *.md pr_number git_commit || ( e=$? && if [ $e -ne 11 ]; then exit $e; fi )
- name: 'Post test report markdown summary as comment on PR'
if: fromJSON(steps.download_artifact.outputs.artifact_id) > 0
@ -72,7 +73,7 @@ jobs:
issue_number: issue_number,
});
const PREFIX = "# Tests failed for Qt ${{ matrix.qt-version }} (${{ matrix.distro }})";
const PREFIX = "# Tests failed for Qt ${{ matrix.qt-version }} (${{ matrix.test-batch }} - ${{ matrix.distro }})";
let body = PREFIX + "\n\n";
body += "*One or more tests failed using the build from commit " + git_sha + "*\n\n";