Skip to content

Commit 736ba41

Browse files
authored
ci(e2e): run e2e report cron after e2e tests finish (#2513)
We run the next.js repo e2e tests every day at 3am UTC but we were running the e2e report (which pulls the artefacts from the e2e workflow) every Wednesday at 3am UTC. We might as well defer it slightly and pull the data from the freshest run. In addition, since we weren't filtering on run status, it was almost always failing since the e2e report workflow queried for the most recent e2e test workflow run and, if it had already started, would fail to find its artefacts (because it had started but not completed). I fixed this by adding the missing status filter.
1 parent e361b06 commit 736ba41

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/e2e-report.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 'Deploy e2e test page'
22
on:
33
schedule:
4-
- cron: '0 3 * * 3' # Run every Wednesday at 3am UTC
4+
- cron: '0 6 * * 3' # Run every Wednesday at 6am UTC
55
workflow_dispatch:
66
inputs:
77
use-branch:
@@ -22,9 +22,9 @@ jobs:
2222
id: get-run-id
2323
run: |
2424
if [ "${{ inputs.use-branch }}" == "true" ]; then
25-
E2E_RUN_ID=$(gh run list -w test-e2e.yml -e workflow_dispatch -b $GITHUB_REF_NAME --json databaseId --jq ".[0].databaseId" --repo $GITHUB_REPOSITORY)
25+
E2E_RUN_ID=$(gh run list -w test-e2e.yml -e workflow_dispatch -s success -b $GITHUB_REF_NAME --json databaseId --jq ".[0].databaseId" --repo $GITHUB_REPOSITORY)
2626
else
27-
E2E_RUN_ID=$(gh run list -w test-e2e.yml -e schedule --json databaseId --jq ".[0].databaseId" --repo $GITHUB_REPOSITORY)
27+
E2E_RUN_ID=$(gh run list -w test-e2e.yml -e schedule -s success --json databaseId --jq ".[0].databaseId" --repo $GITHUB_REPOSITORY)
2828
fi
2929
echo "runId=$E2E_RUN_ID" >> $GITHUB_OUTPUT
3030
- name: Download latest e2e results

0 commit comments

Comments
 (0)