.github/workflows: use write-artifacts and prevent rebuild (#40)

* .github/workflows: use write-artifacts to prevent rebuild

* .github/workflows: increase build timeout

* .github: add testground install retry
This commit is contained in:
Laurent Senta 2022-09-23 11:42:26 +02:00 committed by GitHub
parent 24b30b2b3f
commit 1b981a33e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 5 deletions

View File

@ -19,8 +19,13 @@ runs:
if: ${{ inputs.testground_ref == 'edge' }}
shell: bash
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/testground/testground/master/install.sh)"
for i in 1 2 3; do
echo "=== Attempt $i ==="
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/testground/testground/master/install.sh)" && \
exit 0
sleep 10
done
exit 1
# Custom setup (slower) when we use a different testground_ref
- name: Checkout testground
if: ${{ inputs.testground_ref != 'edge' }}

View File

@ -36,6 +36,7 @@ jobs:
TEST_PLAN_REPO: ${{ inputs.test_repository || 'libp2p/test-plans' }}
TEST_PLAN_BRANCH: ${{ inputs.test_ref || 'master' }}
TESTGROUND_ENDPOINT: ${{ inputs.testground_endpoint }}
COMPOSITION_FILE: ${{ inputs.composition_file }}
defaults:
run:
shell: bash
@ -62,12 +63,13 @@ jobs:
echo "::set-output name=custom_git_sha::${SHA}"
- name: Build the composition file
working-directory: ./test-plans
timeout-minutes: 30
timeout-minutes: 40
run: |
for i in 1 2 3; do
echo "=== Attempt $i ==="
testground build composition \
-f ${{ inputs.composition_file }} \
-f "${COMPOSITION_FILE}" \
--write-artifacts \
--wait && exit 0;
sleep 10
done
@ -81,7 +83,7 @@ jobs:
timeout-minutes: 6
run: |
testground run composition \
-f ${{ inputs.composition_file }} \
-f "${COMPOSITION_FILE}" \
--metadata-repo "${GITHUB_REPOSITORY}" \
--metadata-branch "${GITHUB_REF#refs/heads/}" \
--metadata-commit "${GITHUB_SHA}" \
@ -98,5 +100,6 @@ jobs:
path: |
~/testground/
~/test-plans/result.tgz
${{env.COMPOSITION_FILE}}
testground.*
test-plans/*.out