You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: use branch test results for e2e page (#517)
* added input
* add if to stop deplot if not run ID
* changes input type to boolean
* remove string
* revert
---------
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Copy file name to clipboardExpand all lines: .github/workflows/e2e-report.yml
+10-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,10 @@
1
1
name: 'Deploy e2e test page'
2
2
on:
3
3
workflow_dispatch:
4
+
inputs:
5
+
use-branch:
6
+
description: 'Enable if you want to test data from your selected branch instead of the scheduled test runs from Main'
7
+
type: boolean
4
8
5
9
env:
6
10
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
@@ -15,9 +19,14 @@ jobs:
15
19
- name: Get run id
16
20
id: get-run-id
17
21
run: |
18
-
E2E_RUN_ID=$(gh run list -w test-e2e.yml -e schedule --json databaseId --jq ".[0].databaseId" --repo $GITHUB_REPOSITORY)
22
+
if [ "${{ inputs.use-branch }}" == "true" ]; then
23
+
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)
24
+
else
25
+
E2E_RUN_ID=$(gh run list -w test-e2e.yml -e schedule --json databaseId --jq ".[0].databaseId" --repo $GITHUB_REPOSITORY)
26
+
fi
19
27
echo "runId=$E2E_RUN_ID" >> $GITHUB_OUTPUT
20
28
- name: Download latest e2e results
29
+
if: ${{ steps.get-run-id.outputs.runId }}
21
30
run: |
22
31
echo "Downloading latest test results from run https://github.com/netlify/next-runtime-minimal/actions/runs/${{ steps.get-run-id.outputs.runId }}"
0 commit comments