7
7
use-branch :
8
8
description : ' Enable if you want to test data from your selected branch instead of the scheduled test runs from Main'
9
9
type : boolean
10
+ version :
11
+ description : ' Version of Next.js (most recent test run must have included this version)'
12
+ type : choice
13
+ options :
14
+ - ' latest'
15
+ - ' canary'
16
+ - ' 13.5.1'
17
+ default : ' latest'
10
18
11
19
env :
12
20
NETLIFY_AUTH_TOKEN : ${{ secrets.NETLIFY_AUTH_TOKEN }}
@@ -27,12 +35,19 @@ jobs:
27
35
E2E_RUN_ID=$(gh run list -w test-e2e.yml -e schedule -s success --json databaseId --jq ".[0].databaseId" --repo $GITHUB_REPOSITORY)
28
36
fi
29
37
echo "runId=$E2E_RUN_ID" >> $GITHUB_OUTPUT
30
- - name : Download latest e2e results
38
+ - name : Download e2e results
31
39
if : ${{ steps.get-run-id.outputs.runId }}
32
40
run : |
33
- echo "Downloading latest test results from run https://github.com/netlify/next-runtime/actions/runs/${{ steps.get-run-id.outputs.runId }}"
34
- rm e2e-report/data/test-results.json
35
- gh run download ${{ steps.get-run-id.outputs.runId }} -n "latest-test-results.json" -D e2e-report/data/ --repo $GITHUB_REPOSITORY
41
+ version="${{ inputs.version }}"
42
+ version=${version:-latest}
43
+ OUTPUT_DIR="e2e-report/data"
44
+ OUTPUT_FILENAME="test-results.json"
45
+ echo "Downloading ${version} test results from run https://github.com/netlify/next-runtime/actions/runs/${{ steps.get-run-id.outputs.runId }}"
46
+ rm "${OUTPUT_DIR}/${OUTPUT_FILENAME}"
47
+ artifact_name="${version}-test-results.json"
48
+ # NOTE: The artifact name is not necessarily the artifact *file* name. The file name here
49
+ # must be `test-results.json`, but this is defined at the artifact upload step.
50
+ gh run download ${{ steps.get-run-id.outputs.runId }} -n "${artifact_name}" -D "${OUTPUT_DIR}" --repo $GITHUB_REPOSITORY
36
51
- name : Install site dependencies
37
52
if : success()
38
53
run : |
0 commit comments