OPS-6304 Radomize job name for examples #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# ------------------------------------------------------------------------------------------------- | |
# Job Name | |
# ------------------------------------------------------------------------------------------------- | |
name: test | |
# ------------------------------------------------------------------------------------------------- | |
# When to run | |
# ------------------------------------------------------------------------------------------------- | |
on: | |
# Runs on Pull Requests | |
pull_request: | |
# ------------------------------------------------------------------------------------------------- | |
# What to run | |
# ------------------------------------------------------------------------------------------------- | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
# ------------------------------------------------------------ | |
# Checkout repository | |
# ------------------------------------------------------------ | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Test | |
run: | | |
retry() { | |
for n in $(seq ${RETRIES}); do | |
echo "[${n}/${RETRIES}] ${*}"; | |
if eval "${*}"; then | |
echo "[SUCC] ${n}/${RETRIES}"; | |
return 0; | |
fi; | |
sleep 2; | |
echo "[FAIL] ${n}/${RETRIES}"; | |
done; | |
return 1; | |
} | |
retry make test | |
env: | |
RETRIES: 20 |