Skip to content

Commit

Permalink
Improve self-test by running E2E last to have queue slots
Browse files Browse the repository at this point in the history
  • Loading branch information
Luc45 committed Oct 26, 2023
1 parent 7e943b4 commit 0de8ce8
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/self-test-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,28 @@ jobs:

steps:
- name: Wait before request to avoid 429
if: github.event_name == 'schedule'
run: |
if [[ "${{ inputs.test_type }}" == "activation" ]]; then
echo "Test type is activation. No wait."
elif [[ "${{ inputs.test_type }}" == "api" ]]; then
echo "Test type is api. Waiting 30 seconds."
sleep 30
elif [[ "${{ inputs.test_type }}" == "e2e" ]]; then
echo "Test type is e2e. Waiting 60 seconds."
sleep 60
elif [[ "${{ inputs.test_type }}" == "phpstan" ]]; then
echo "Test type is phpstan. Waiting 90 seconds."
sleep 90
echo "Test type is phpstan. Waiting 60 seconds."
sleep 60
elif [[ "${{ inputs.test_type }}" == "security" ]]; then
echo "Test type is security. Waiting 120 seconds."
sleep 120
echo "Test type is security. Waiting 90 seconds."
sleep 90
elif [[ "${{ inputs.test_type }}" == "phpcompatibility" ]]; then
echo "Test type is phpcompatibility. Waiting 150 seconds."
echo "Test type is phpcompatibility. Waiting 120 seconds."
sleep 120
# E2E should always be last, as it takes long and uses queue slots.
elif [[ "${{ inputs.test_type }}" == "e2e" ]]; then
echo "Test type is e2e. Waiting 150 seconds."
sleep 150
else
echo "Unknown test type. No wait."
fi
Expand Down

0 comments on commit 0de8ce8

Please sign in to comment.