Skip to content

Commit

Permalink
use brotli instead of gzip for test result compression
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-manes committed Sep 22, 2024
1 parent e32eccd commit 3bc4b61
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,19 @@ jobs:
echo "ARTIFACT_NAME=$ARTIFACT_NAME" >> $GITHUB_ENV
- name: Compress test results
if: always() && (env.JAVA_VERSION == env.PUBLISH_JDK)
run: >
find . -path */jacoco/*.exec -o -path */results/*.xml
| tar czf ${{ env.ARTIFACT_NAME }}.tar.gz --files-from -
run: |
tmp_file=$(mktemp)
tar_file=$(mktemp --suffix=.tar)
find . -path */jacoco/*.exec -o -path */results/*.xml > "$tmp_file"
tar c --files-from="$temp_file" -f "$tar_file"
brotli -o "${{ env.ARTIFACT_NAME }}.tar.br" "$tar_file"
- name: Upload test results
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
if: always() && (env.JAVA_VERSION == env.PUBLISH_JDK)
with:
retention-days: 1
name: ${{ env.ARTIFACT_NAME }}-results
path: ${{ env.ARTIFACT_NAME }}.tar.gz
path: ${{ env.ARTIFACT_NAME }}.tar.br
- name: Cancel if failed
uses: andymckay/cancel-action@a955d435292c0d409d104b57d8e78435a93a6ef1 # 0.5
continue-on-error: true
Expand Down Expand Up @@ -239,7 +242,9 @@ jobs:
- name: Download Tests Results
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
- name: Decompress
run: find . -type f -name '*.tar.gz' -exec sh -c 'tar -zxf {} --one-top-level' \;
run: >
find . -type f -name '*.tar.br' -exec sh -c
'brotli -d "$1" && tar -xf "${1%.br}" --one-top-level' _ {} \;
- name: Combine Jacoco Reports
uses: ./.github/actions/run-gradle
with:
Expand Down Expand Up @@ -298,7 +303,9 @@ jobs:
- name: Download Tests
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
- name: Decompress
run: find . -type f -name '*.tar.gz' -exec sh -c 'tar -zxf {} --one-top-level' \;
run: >
find . -type f -name '*.tar.br' -exec sh -c
'brotli -d "$1" && tar -xf "${1%.br}" --one-top-level' _ {} \;
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@82082dac68ad6a19d980f8ce817e108b9f496c2a # v2.17.1
continue-on-error: true
Expand Down

0 comments on commit 3bc4b61

Please sign in to comment.