Skip to content

Commit 1b5aa83

Browse files
taty2010piehserhalp
authored
chore: e2e tests results page (#422)
* site setup * add timestamp to json data * download data to e2e site * remove site from report * chore: format with prettier * update path * deploy preview on test run * updaate chart to use group data * put % and # in right place * smol updates * remove slack notification * update svgs and styles * add skipped test suites to drpdwns * remove skipped from main results * remove deploy step * remove deployInfo2slack.ts * rename svg file to make casing consistent * configure node version in package.json and remove eslint-disable for unsupported-featrures * Apply suggestions from code review Co-authored-by: Philippe Serhal <[email protected]> * remove unused classnames * get result of command and not command * provide token * specify repo * checkout repo and provide ntl auth token * install site deps * install deps in site directory and not repo root * remove sample test-results.json before downloading fresh one * checkout early * define test groups in single location * destroy the chart in useEffect cleanup instead of trying to find previous one and destroying it early in useEffect * don't need env per step * fix Inter font * use standard bold weight to avoid fake bold * don't use root repo eslint config for report site * bump site deps * remove no longer unit script --------- Co-authored-by: taty2010 <[email protected]> Co-authored-by: Michal Piechowiak <[email protected]> Co-authored-by: Philippe Serhal <[email protected]>
1 parent f6d4661 commit 1b5aa83

26 files changed

+18594
-141
lines changed

.github/workflows/e2e-report.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,30 @@ on:
33
workflow_dispatch:
44

55
env:
6-
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
6+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
77
NETLIFY_SITE_ID: ${{ secrets.E2E_PAGE_SITE_ID }}
8+
GH_TOKEN: ${{ github.token }}
89

910
jobs:
1011
setup:
1112
runs-on: ubuntu-latest
1213
steps:
14+
- uses: actions/checkout@v4
1315
- name: Get run id
1416
id: get-run-id
1517
run: |
16-
E2E_RUN_ID='gh run list -w test-e2e.yml -e schedule --json databaseId --jq ".[0].databaseId"'
18+
E2E_RUN_ID=$(gh run list -w test-e2e.yml -e schedule --json databaseId --jq ".[0].databaseId" --repo $GITHUB_REPOSITORY)
1719
echo "runId=$E2E_RUN_ID" >> $GITHUB_OUTPUT
1820
- name: Download latest e2e results
1921
run: |
2022
echo "Downloading latest test results from run https://github.com/netlify/next-runtime-minimal/actions/runs/${{ steps.get-run-id.outputs.runId }}"
21-
gh run download ${{ steps.get-run-id.outputs.runId }} -n "latest-test-results.json" -D e2e-report/data/
23+
rm e2e-report/data/test-results.json
24+
gh run download ${{ steps.get-run-id.outputs.runId }} -n "latest-test-results.json" -D e2e-report/data/ --repo $GITHUB_REPOSITORY
25+
- name: Install site dependencies
26+
if: success()
27+
run: |
28+
npm ci
29+
working-directory: e2e-report
2230
- name: Deploy e2e page
2331
if: success()
2432
run: |

.github/workflows/test-e2e.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,4 @@ jobs:
255255
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
256256
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
257257
with:
258-
payload: ${{ steps.publish-test-results.outputs.slackEvent }}
259-
260-
- name: Publish test site
261-
if: (success() || failure()) && matrix.version == 'latest' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
262-
run: |
263-
deno run -A tools/deno/junit2html.ts artifacts ${{needs.e2e.outputs.tag}} > report/index.html
264-
npx --yes netlify-cli@latest deploy --prod --cwd report
258+
payload: ${{ steps.publish-test-results.outputs.slackEvent }}

e2e-report/.eslintrc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "next/core-web-vitals",
3+
"root": true
4+
}

e2e-report/.gitignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
.yarn/install-state.gz
8+
9+
# testing
10+
/coverage
11+
12+
# next.js
13+
/.next/
14+
/out/
15+
16+
# production
17+
/build
18+
19+
# misc
20+
.DS_Store
21+
*.pem
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# local env files
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts

e2e-report/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Next Runtime v5 Report

e2e-report/app/favicon.ico

2.19 KB
Binary file not shown.

0 commit comments

Comments
 (0)