Skip to content

Commit 79e81f3

Browse files
committed
feat: implement retries in e2e test in backward compatibility workflow
1 parent d01eb72 commit 79e81f3

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

.github/workflows/backward-compatibility.yml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -119,18 +119,29 @@ jobs:
119119
mkdir artifacts
120120
121121
- name: Run E2E tests
122-
shell: bash
123-
run: |
124-
./mithril-binaries/e2e/mithril-end-to-end -vvv \
125-
--bin-directory ./mithril-binaries/e2e \
126-
--work-directory=./artifacts \
127-
--devnet-scripts-directory=./mithril-test-lab/mithril-devnet \
128-
--cardano-node-version ${{ matrix.cardano_node_version }} \
129-
--cardano-slot-length 0.25 \
130-
--cardano-epoch-length 45.0 \
131-
--signed-entity-types ${{ needs.prepare-env-variables.outputs.signed-entity-types }} \
132-
&& echo "SUCCESS=true" >> $GITHUB_ENV \
133-
|| (echo "SUCCESS=false" >> $GITHUB_ENV && exit 1)
122+
uses: nick-fields/retry@v3
123+
with:
124+
shell: bash
125+
max_attempts: 3
126+
retry_on_exit_code: 2
127+
timeout_minutes: 10
128+
warning_on_retry: true
129+
command: |
130+
./mithril-binaries/e2e/mithril-end-to-end -vvv \
131+
--bin-directory ./mithril-binaries/e2e \
132+
--work-directory=./artifacts \
133+
--devnet-scripts-directory=./mithril-test-lab/mithril-devnet \
134+
--cardano-node-version ${{ matrix.cardano_node_version }} \
135+
--cardano-slot-length 0.25 \
136+
--cardano-epoch-length 45.0 \
137+
--signed-entity-types ${{ needs.prepare-env-variables.outputs.signed-entity-types }}
138+
EXIT_CODE=$?
139+
if [ $EXIT_CODE -eq 0 ]; then
140+
echo "SUCCESS=true" >> $GITHUB_ENV
141+
else
142+
echo "SUCCESS=false" >> $GITHUB_ENV
143+
fi
144+
exit $EXIT_CODE
134145
135146
- name: Define the JSON file name for the test result
136147
shell: bash

0 commit comments

Comments
 (0)