@@ -3,131 +3,38 @@ name: ci
3
3
on : push
4
4
5
5
jobs :
6
- prepare :
7
- name : Prepare (${{ matrix.os}}, Node ${{ matrix.node }})
8
- runs-on : ${{ matrix.os }}
9
- strategy :
10
- matrix :
11
- os : [ubuntu-latest]
12
- node : [16, 18, 20]
13
-
14
- steps :
15
- - name : Set up Node
16
- uses : actions/setup-node@v3
17
- with :
18
- node-version : ${{ matrix.node }}
19
-
20
- - name : Checkout
21
- uses : actions/checkout@master
22
-
23
- - name : Cache node_modules
24
- id : cache
25
- uses : actions/cache@v3
26
- with :
27
- path : node_modules
28
- key : ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
29
-
30
- - name : Install dependencies
31
- if : steps.cache.outputs.cache-hit != 'true'
32
- run : npm ci
6
+ ci :
7
+ name : Prepare (${{ matrix.os}}, Node.js ${{ matrix.node }})
33
8
34
- suite :
35
- needs : prepare
36
- name : Suite (${{ matrix.os}}, Node ${{ matrix.node }})
37
- runs-on : ${{ matrix.os }}
38
9
strategy :
39
- fail-fast : false
40
10
matrix :
41
11
os : [ubuntu-latest]
42
- node : [16, 18, 20]
43
-
44
- steps :
45
- - name : Set up Node
46
- uses : actions/setup-node@v3
47
- with :
48
- node-version : ${{ matrix.node }}
49
-
50
- - name : Checkout
51
- uses : actions/checkout@master
52
-
53
- - name : Retrieve node_modules
54
- uses : actions/cache@v3
55
- with :
56
- path : node_modules
57
- key : ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
58
-
59
- - name : Lint
60
- run : npm run lint
61
-
62
- - name : Unit
63
- run : npm run unit
64
-
65
- - name : Build
66
- run : npm run build
67
-
68
- - name : Coverage
69
- if : matrix.os == 'ubuntu-latest' && matrix.node == 16
70
- uses : codecov/codecov-action@v3
71
-
72
- types :
73
- needs : prepare
74
- name : Types (${{ matrix.os}}, Node ${{ matrix.node }}, TS ${{ matrix.typescript }})
75
- runs-on : ${{ matrix.os }}
76
- strategy :
12
+ node : [18, 20, 22]
77
13
fail-fast : false
78
- matrix :
79
- os : [ubuntu-latest]
80
- node : [16]
81
- typescript : ["4.7", "4.8", "4.9", "5.0"]
82
14
83
- steps :
84
- - name : Set up Node
85
- uses : actions/setup-node@v3
86
- with :
87
- node-version : ${{ matrix.node }}
88
-
89
- - name : Checkout
90
- uses : actions/checkout@master
91
-
92
- - name : Retrieve node_modules
93
- uses : actions/cache@v3
94
- with :
95
- path : node_modules
96
- key : ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
97
-
98
- - name : Overwrite TypeScript
99
- run : npm install --no-save typescript@${{ matrix.typescript }} && npx tsc --version
100
-
101
- - name : Types
102
- run : npm run types
103
-
104
- size :
105
- needs : prepare
106
- if : github.event_name == 'pull_request'
107
- name : Size (${{ matrix.os}}, Node ${{ matrix.node }})
108
15
runs-on : ${{ matrix.os }}
109
- strategy :
110
- fail-fast : false
111
- matrix :
112
- os : [ubuntu-latest]
113
- node : [16]
114
16
115
17
steps :
116
- - name : Set up Node
117
- uses : actions/setup-node@v3
18
+ - uses : actions/checkout@v4
19
+ - uses : actions/setup-node@v4
118
20
with :
119
21
node-version : ${{ matrix.node }}
120
-
121
- - name : Checkout
122
- uses : actions/checkout@master
123
-
124
- - name : Retrieve node_modules
125
- uses : actions/cache@v3
126
- with :
127
- path : node_modules
128
- key : ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
129
-
130
- - name : Size
131
- uses : andresz1/size-limit-action@v1
22
+ registry-url : " https://registry.npmjs.org/"
23
+ - run : npm ci
24
+ - run : npx playwright install --with-deps
25
+ - run : npm run lint
26
+ - run : npm run build
27
+ - uses : andresz1/size-limit-action@v1
28
+ if : ${{ github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest' && matrix.node == 22 }}
132
29
with :
133
30
github_token : ${{ secrets.GITHUB_TOKEN }}
31
+ - run : npm run e2e
32
+ env :
33
+ PLAYWRIGHT_PRISMIC_EMAIL : ${{ secrets.PLAYWRIGHT_PRISMIC_EMAIL }}
34
+ PLAYWRIGHT_PRISMIC_PASSWORD : ${{ secrets.PLAYWRIGHT_PRISMIC_PASSWORD }}
35
+ - uses : actions/upload-artifact@v4
36
+ if : ${{ !cancelled() }}
37
+ with :
38
+ name : playwright-report (${{ matrix.os }}, Node.js ${{ matrix.node }})
39
+ path : playwright-report/
40
+ retention-days : 30
0 commit comments