File tree Expand file tree Collapse file tree 2 files changed +50
-12
lines changed Expand file tree Collapse file tree 2 files changed +50
-12
lines changed Original file line number Diff line number Diff line change 1
1
name : build
2
2
on : [push, pull_request]
3
+
3
4
jobs :
4
5
build :
5
6
runs-on : ubuntu-latest
7
+ timeout-minutes : 5
6
8
strategy :
7
9
matrix :
8
10
node-version : [14]
11
+
9
12
steps :
10
- - uses : actions/checkout@v2
13
+ - name : Checkout repository
14
+ uses : actions/checkout@v2
11
15
with :
12
16
fetch-depth : 0
17
+
13
18
- name : Use Node.js ${{ matrix.node-version }}
14
- uses : actions/setup-node@v1
19
+ uses : actions/setup-node@v2
15
20
with :
16
21
node-version : ${{ matrix.node-version }}
17
- - run : npm install
18
- - run : npx commitlint --from=HEAD~1
19
- - run : npm run lint
20
- - run : npm run lint:dts
21
- - run : npm run test:ci
22
- - run : npm run test:module
23
- - run : npm run test:integration
24
- - run : npm run benchmark
22
+
23
+ - name : Cache node modules
24
+ uses : actions/cache@v2
25
+ env :
26
+ cache-name : cache-node-modules
27
+ with :
28
+ # npm cache files are stored in `~/.npm` on Linux/macOS
29
+ path : ~/.npm
30
+ key : ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
31
+ restore-keys : |
32
+ ${{ runner.os }}-node-
33
+
34
+ - name : Install dependencies
35
+ run : npm install
36
+
37
+ - name : Lint commit message
38
+ run : npx commitlint --from=HEAD~1
39
+
40
+ - name : Lint JavaScript files
41
+ run : npm run lint
42
+
43
+ - name : Lint TypeScript declaration files
44
+ run : npm run lint:dts
45
+
46
+ - name : Run unit tests
47
+ run : npm run test:ci
48
+
49
+ - name : Run ES modules tests
50
+ run : npm run test:module
51
+
52
+ - name : Run integration tests
53
+ run : npm run test:integration
54
+
55
+ - name : Run benchmark
56
+ run : npm run benchmark
57
+
25
58
- name : Coveralls
26
59
uses : coverallsapp/github-action@master
27
60
with :
Original file line number Diff line number Diff line change 6
6
jobs :
7
7
size :
8
8
runs-on : ubuntu-latest
9
+ timeout-minutes : 5
9
10
env :
10
11
CI_JOB_NUMBER : 1
12
+
11
13
steps :
12
- - uses : actions/checkout@v2
13
- - uses : andresz1/size-limit-action@v1
14
+ - name : Checkout repository
15
+ uses : actions/checkout@v2
16
+
17
+ - name : Size Limit
18
+ uses : andresz1/size-limit-action@v1
14
19
with :
15
20
github_token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments