Skip to content

Commit

Permalink
Merge pull request #5167 from input-output-hk/mgalazyn/feature/ci-sto…
Browse files Browse the repository at this point in the history
…re-failed-test-workspaces

Upload failed tests workspaces to artifacts in GitHub CI
  • Loading branch information
carbolymer authored May 2, 2023
2 parents 0a7cf7c + 1a722d8 commit 6f05a08
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/haskell-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,22 @@ jobs:
KEEP_WORKSPACE: 1
run: cabal test cardano-testnet cardano-api cardano-node cardano-node-chairman cardano-cli cardano-submit-api

- name: Tar failed tests workspaces
if: ${{ failure() }}
env:
TMP: ${{ runner.temp }}
shell: bash
run: |
cd $TMP
find . -name 'module' -type f -printf '%h\n' | xargs -L1 basename | sort -u | xargs tar -czvf workspaces.tgz
- name: Upload workspaces on tests failure
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: failed-test-workspaces-${{ matrix.os }}-ghc${{ matrix.ghc }}-cabal${{ matrix.cabal }}.tgz
path: ${{ runner.temp }}/workspaces.tgz

- name: "Tar artifacts"
shell: bash
run: |
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,22 @@ jobs:
${{ (runner.os == 'Windows' && '$env:PATH=("C:\msys64\mingw64\bin;{0}" -f $env:PATH)') || '' }}
cabal test cardano-testnet cardano-api cardano-node cardano-node-chairman cardano-cli cardano-submit-api
- name: Tar failed tests workspaces
if: ${{ failure() }}
env:
TMP: ${{ runner.temp }}
shell: bash
run: |
cd $TMP
find . -name 'module' -type f -printf '%h\n' | xargs -L1 basename | sort -u | xargs tar -czvf workspaces.tgz
- name: Upload workspaces on tests failure
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: failed-test-workspaces-${{ matrix.os }}-ghc${{ matrix.ghc }}-cabal${{ matrix.cabal }}.tgz
path: ${{ runner.temp }}/workspaces.tgz

- name: "Tar artifacts"
shell: bash
run: |
Expand Down

0 comments on commit 6f05a08

Please sign in to comment.