Reduce number of artifacts by merging them

This commit is contained in:
Pedro Algarvio 2024-05-12 07:41:20 +01:00
parent 374a960510
commit 28f30b1de0
10 changed files with 156 additions and 40 deletions

View file

@ -1808,12 +1808,20 @@ jobs:
- name: Merge All Code Coverage Test Run Artifacts
uses: actions/upload-artifact/merge@v4
id: merge-coverage-artifacts
with:
name: all-testrun-coverage-artifacts
pattern: all-testrun-coverage-artifacts-*
separate-directories: false
delete-merged: true
- name: Get coverage reports
id: get-coverage-reports
uses: actions/download-artifact@v4
with:
pattern: all-testrun-coverage-artifacts-*
merge-multiple: true
name: all-testrun-coverage-artifacts
path: artifacts/coverage/
- name: Display structure of downloaded files

View file

@ -1870,12 +1870,20 @@ jobs:
- name: Merge All Code Coverage Test Run Artifacts
uses: actions/upload-artifact/merge@v4
id: merge-coverage-artifacts
with:
name: all-testrun-coverage-artifacts
pattern: all-testrun-coverage-artifacts-*
separate-directories: false
delete-merged: true
- name: Get coverage reports
id: get-coverage-reports
uses: actions/download-artifact@v4
with:
pattern: all-testrun-coverage-artifacts-*
merge-multiple: true
name: all-testrun-coverage-artifacts
path: artifacts/coverage/
- name: Display structure of downloaded files

View file

@ -1847,12 +1847,20 @@ jobs:
- name: Merge All Code Coverage Test Run Artifacts
uses: actions/upload-artifact/merge@v4
id: merge-coverage-artifacts
with:
name: all-testrun-coverage-artifacts
pattern: all-testrun-coverage-artifacts-*
separate-directories: false
delete-merged: true
- name: Get coverage reports
id: get-coverage-reports
uses: actions/download-artifact@v4
with:
pattern: all-testrun-coverage-artifacts-*
merge-multiple: true
name: all-testrun-coverage-artifacts
path: artifacts/coverage/
- name: Display structure of downloaded files

View file

@ -342,12 +342,20 @@
#}
- name: Merge All Code Coverage Test Run Artifacts
uses: actions/upload-artifact/merge@v4
id: merge-coverage-artifacts
with:
name: all-testrun-coverage-artifacts
pattern: all-testrun-coverage-artifacts-*
separate-directories: false
delete-merged: true
- name: Get coverage reports
id: get-coverage-reports
uses: actions/download-artifact@v4
with:
pattern: all-testrun-coverage-artifacts-*
merge-multiple: true
name: all-testrun-coverage-artifacts
path: artifacts/coverage/
- name: Display structure of downloaded files

View file

@ -79,7 +79,7 @@ env:
jobs:
generate-matrix:
name: Test Matrix
name: Test Matrix${{ inputs.fips && ' (fips)' || '' }}
runs-on: ubuntu-latest
outputs:
matrix-include: ${{ steps.generate-matrix.outputs.matrix }}
@ -266,7 +266,7 @@ jobs:
rm -rf artifacts/salt*
tree -a artifacts
if [ "${{ inputs.skip-code-coverage }}" != "true" ]; then
mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ inputs.distro-slug }}.${{ inputs.nox-session }}.${{ matrix.transport }}.${{ matrix.tests-chunk }}.grp${{ matrix.test-group || '1' }}
mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ inputs.distro-slug }}.${{ inputs.nox-session }}.${{ matrix.transport }}.${{ matrix.tests-chunk }}.grp${{ matrix.test-group || '1' }}${{ matrix.fips && '-fips ' || '' }}
fi
- name: Destroy VM
@ -299,7 +299,7 @@ jobs:
artifacts/logs
report:
name: Test Reports
name: Test Reports${{ inputs.fips && ' (fips)' || '' }}
if: always() && fromJSON(needs.generate-matrix.outputs.build-reports) && inputs.skip-code-coverage == false && needs.test.result != 'cancelled' && needs.test.result != 'skipped'
runs-on: ubuntu-latest
needs:
@ -310,13 +310,38 @@ jobs:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: Merge JUnit XML Test Run Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}${{ inputs.fips && '-fips ' || '' }}
pattern: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-*${{ inputs.fips && '-fips ' || '' }}
separate-directories: false
delete-merged: true
- name: Merge Log Test Run Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}${{ inputs.fips && '-fips ' || '' }}
pattern: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-*${{ inputs.fips && '-fips ' || '' }}
separate-directories: false
delete-merged: true
- name: Merge Code Coverage Test Run Artifacts
uses: actions/upload-artifact/merge@v4
if: ${{ inputs.skip-code-coverage == false }}
id: merge-coverage-artifacts
with:
name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}${{ inputs.fips && '-fips ' || '' }}
pattern: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-*${{ inputs.fips && '-fips ' || '' }}
separate-directories: false
delete-merged: true
- name: Download Code Coverage Test Run Artifacts
uses: actions/download-artifact@v4
if: ${{ inputs.skip-code-coverage == false }}
id: download-coverage-artifacts
with:
pattern: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-*
merge-multiple: true
name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}${{ inputs.fips && '-fips ' || '' }}
path: artifacts/coverage/
- name: Show Downloaded Test Run Artifacts
@ -350,11 +375,11 @@ jobs:
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success'
continue-on-error: true
run: |
mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ inputs.distro-slug }}.${{ inputs.nox-session }}
mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ inputs.distro-slug }}.${{ inputs.nox-session }}${{ inputs.fips && '.fips ' || '' }}
- name: Upload Code Coverage DB
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: all-testrun-coverage-artifacts-${{ inputs.distro-slug }}.${{ inputs.nox-session }}
name: all-testrun-coverage-artifacts-${{ inputs.distro-slug }}.${{ inputs.nox-session }}${{ inputs.fips && '-fips ' || '' }}
path: artifacts/coverage

View file

@ -338,13 +338,38 @@ jobs:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: Merge JUnit XML Test Run Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}
pattern: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-*
separate-directories: false
delete-merged: true
- name: Merge Log Test Run Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}
pattern: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-*
separate-directories: false
delete-merged: true
- name: Merge Code Coverage Test Run Artifacts
uses: actions/upload-artifact/merge@v4
if: ${{ inputs.skip-code-coverage == false }}
id: merge-coverage-artifacts
with:
name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}
pattern: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-*
separate-directories: false
delete-merged: true
- name: Download Code Coverage Test Run Artifacts
uses: actions/download-artifact@v4
if: ${{ inputs.skip-code-coverage == false }}
id: download-coverage-artifacts
with:
pattern: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-*
merge-multiple: true
name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}
path: artifacts/coverage/
- name: Show Downloaded Test Run Artifacts

View file

@ -311,13 +311,38 @@ jobs:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: Merge JUnit XML Test Run Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}
pattern: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-*
separate-directories: false
delete-merged: true
- name: Merge Log Test Run Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}
pattern: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-*
separate-directories: false
delete-merged: true
- name: Merge Code Coverage Test Run Artifacts
uses: actions/upload-artifact/merge@v4
if: ${{ inputs.skip-code-coverage == false }}
id: merge-coverage-artifacts
with:
name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}
pattern: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-*
separate-directories: false
delete-merged: true
- name: Download Code Coverage Test Run Artifacts
uses: actions/download-artifact@v4
if: ${{ inputs.skip-code-coverage == false }}
id: download-coverage-artifacts
with:
pattern: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-*
merge-multiple: true
name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}
path: artifacts/coverage/
- name: Show Downloaded Test Run Artifacts

View file

@ -221,7 +221,7 @@ jobs:
if: always() && steps.download-artifacts-from-vm.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.arch }}-${{ inputs.pkg-type }}-${{ matrix.tests-chunk }}-${{ matrix.version || 'no-version'}}
name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.pkg-type }}-${{ inputs.arch }}-${{ matrix.tests-chunk }}-${{ matrix.version || 'no-version'}}
path: |
artifacts
!artifacts/pkg/*
@ -234,21 +234,24 @@ jobs:
if: always() && inputs.skip-code-coverage == false && needs.test.result != 'cancelled' && needs.test.result != 'skipped'
needs:
- test
- generate-matrix
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.generate-matrix.outputs.pkg-matrix-include) }}
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: Merge Test Run Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.pkg-type }}
pattern: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.pkg-type }}-*
separate-directories: true
delete-merged: true
- name: Download Test Run Artifacts
id: download-test-run-artifacts
uses: actions/download-artifact@v4
with:
name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.arch }}-${{ inputs.pkg-type }}-${{ matrix.tests-chunk }}-${{ matrix.version || 'no-version'}}
name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.pkg-type }}
path: artifacts
- name: Show Test Run Artifacts

View file

@ -204,7 +204,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.arch }}-${{ inputs.pkg-type }}-${{ matrix.tests-chunk }}-${{ matrix.version || 'no-version'}}
name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.pkg-type }}-${{ inputs.arch }}-${{ matrix.tests-chunk }}-${{ matrix.version || 'no-version'}}
path: |
artifacts
!artifacts/pkg/*
@ -217,21 +217,24 @@ jobs:
if: always() && inputs.skip-code-coverage == false && needs.test.result != 'cancelled' && needs.test.result != 'skipped'
needs:
- test
- generate-matrix
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.generate-matrix.outputs.pkg-matrix-include) }}
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: Merge Test Run Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.pkg-type }}
pattern: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.pkg-type }}-*
separate-directories: true
delete-merged: true
- name: Download Test Run Artifacts
id: download-test-run-artifacts
uses: actions/download-artifact@v4
with:
name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.arch }}-${{ inputs.pkg-type }}-${{ matrix.tests-chunk }}-${{ matrix.version || 'no-version'}}
name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.pkg-type }}
path: artifacts
- name: Show Test Run Artifacts

View file

@ -220,7 +220,7 @@ jobs:
if: always() && steps.download-artifacts-from-vm.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.arch }}-${{ inputs.pkg-type }}-${{ matrix.tests-chunk }}-${{ matrix.version || 'no-version'}}
name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.pkg-type }}-${{ inputs.arch }}-${{ matrix.tests-chunk }}-${{ matrix.version || 'no-version'}}
path: |
artifacts
!artifacts/pkg/*
@ -233,21 +233,24 @@ jobs:
if: always() && inputs.skip-code-coverage == false && needs.test.result != 'cancelled' && needs.test.result != 'skipped'
needs:
- test
- generate-matrix
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.generate-matrix.outputs.pkg-matrix-include) }}
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: Merge Test Run Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.pkg-type }}
pattern: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.pkg-type }}-*
separate-directories: true
delete-merged: true
- name: Download Test Run Artifacts
id: download-test-run-artifacts
uses: actions/download-artifact@v4
with:
name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.arch }}-${{ inputs.pkg-type }}-${{ matrix.tests-chunk }}-${{ matrix.version || 'no-version'}}
name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.pkg-type }}
path: artifacts
- name: Show Test Run Artifacts