-
Notifications
You must be signed in to change notification settings - Fork 25
88 lines (87 loc) · 2.78 KB
/
pull-request.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Pull Request Actions
on:
push:
branches: [main, next]
pull_request:
types: [ready_for_review, opened, synchronize]
branches: [main, next]
workflow_dispatch:
permissions:
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
setup:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
# timeout-minutes: 8
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v6
- name: Cache node modules
id: cache-node-modules
uses: actions/cache@v3
with:
path: |
./packages/web-components/node_modules
./packages/web-components/dist
key: ${{ runner.os }}-setup-${{ hashFiles('./packages/web-components/package-lock.json')}}-${{ steps.branch-name.outputs.current_branch }}
- name: Install Dependencies
run: npm ci && cd ./packages/web-components && npx playwright install --with-deps
- name: Build
run: npm run build
e2e:
needs: setup
runs-on: ubuntu-latest
timeout-minutes: 7
steps:
- uses: actions/checkout@v2
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v6
- name: Get Cache
uses: actions/cache@v3
id: get-cache
with:
path: |
./packages/web-components/node_modules
./packages/web-components/dist
key: ${{ runner.os }}-setup-${{ hashFiles('./packages/web-components/package-lock.json')}}-${{ steps.branch-name.outputs.current_branch }}
- name: e2e Tests
run: npm run test.e2e.ci
working-directory: ./packages/web-components
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: packages/web-components/playwright-report/
retention-days: 30
VRTs:
needs: setup
runs-on: ubuntu-latest
timeout-minutes: 7
steps:
- uses: actions/checkout@v2
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v6
- name: Get Cache
uses: actions/cache@v3
id: get-cache
with:
path: |
./packages/web-components/node_modules
./packages/web-components/dist
key: ${{ runner.os }}-setup-${{ hashFiles('./packages/web-components/package-lock.json')}}-${{ steps.branch-name.outputs.current_branch }}
- name: Run VRTs
run: npm run test.vrt
working-directory: ./packages/web-components
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: packages/web-components/playwright-report/
retention-days: 30