-
Notifications
You must be signed in to change notification settings - Fork 9
51 lines (46 loc) · 1.23 KB
/
e2e.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Automation Testing (Draft)
on:
push:
branches: [ main, main-beta, epic/* ]
workflow_dispatch:
env:
node-version: 20.x
DIFF_REPORT_BRANCH: diff-report
permissions:
contents: write
pages: none
deployments: none
pull-requests: write
jobs:
e2e-tests:
name: Automation Testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node v${{ env.node-version }}
uses: actions/setup-node@v4
with:
cache: 'npm'
node-version: ${{ env.node-version }}
- name: Install NPM Dependencies
run: npm ci
- name: Run Tests
run: npm run test:e2e
- name: Collect Report & Upload artifact
if: failure()
uses: actions/upload-artifact@v4
with:
name: automation-diff-report
path: e2e/.diff
- name: Deploy latest report to branch
if: failure()
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: e2e/.diff
publish_branch: ${{ env.DIFF_REPORT_BRANCH }}
- name: Render Report
if: always()
shell: bash
run: |
cat e2e/.diff/index.md >> $GITHUB_STEP_SUMMARY