Skip to content

Commit

Permalink
add case for test failure on
Browse files Browse the repository at this point in the history
  • Loading branch information
bitcoin-tools authored Aug 23, 2024
1 parent 65f3b1f commit dc5d46e
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Test the console output
id: test-nodebuilder
uses: vmactions/freebsd-vm@v1
timeout-minutes: 180
continue-on-error: true
with:
prepare: |
uname -a
Expand All @@ -309,11 +312,31 @@ jobs:
run: |
/bin/sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}"
cp "${HOME}/.bitcoin/debug.log" .
- name: If test failed, debug nodebuilder ${{ matrix.additional-args }}
if: steps.test-nodebuilder.outcome == 'failure'
uses: vmactions/freebsd-vm@v1
timeout-minutes: 180
env:
CI_NODEBUILDER_URL: https://github.com/bitcoin-tools/nodebuilder/raw/master/nodebuilder
with:
prepare: pkg install --yes wget
envs: 'CI_NODEBUILDER_URL'
run: |
if [ -n "$(ls /usr/local/bin/*bitcoin*)" ]; then
rm /usr/local/bin/*bitcoin*
fi
wget --no-verbose --retry-connrefused "${CI_NODEBUILDER_URL}"
chmod u+x nodebuilder
/bin/sh -x ./nodebuilder ${{ matrix.additional-args }}
cp "${HOME}/.bitcoin/debug.log" .
- name: Save Bitcoin Core log as artifact
uses: actions/upload-artifact@v4
with:
name: freebsd-source-bitcoin-debug.log
path: /home/runner/work/nodebuilder/nodebuilder/debug.log
- name: If test failed, fail the job
if: steps.test-nodebuilder.outcome == 'failure'
run: printf '%s\n' "Review the step 'Test the console output' above." && exit 1

run-nodebuilder-docker:
name: Docker image for ${{ matrix.container }}
Expand Down

0 comments on commit dc5d46e

Please sign in to comment.