File tree 5 files changed +89
-14
lines changed
5 files changed +89
-14
lines changed Original file line number Diff line number Diff line change
1
+ name : ci
2
+
3
+ on :
4
+ - push
5
+ - pull_request
6
+
7
+ jobs :
8
+
9
+ build :
10
+ name : Continuous integration (build)
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Checkout 🛎️
14
+ uses : actions/checkout@v2
15
+
16
+ - name : Install 📦
17
+ uses : bahmutov/npm-install@v1
18
+ with :
19
+ install-command : yarn --frozen-lockfile --ignore-scripts
20
+ useRollingCache : true
21
+
22
+ - name : Build 🏗️
23
+ run : yarn build
24
+
25
+ - name : Archive build 💽
26
+ uses : actions/upload-artifact@v2
27
+ with :
28
+ name : dist
29
+ path : dist
30
+ retention-days : 1
31
+
32
+ test :
33
+ needs : ["build"]
34
+ name : Continuous integration (tests)
35
+ runs-on : ubuntu-latest
36
+ strategy :
37
+ matrix :
38
+ bundle : ["modern", "module", "cjs"]
39
+ steps :
40
+ - name : Checkout 🛎️
41
+ uses : actions/checkout@v2
42
+
43
+ - name : Install 📦
44
+ uses : bahmutov/npm-install@v1
45
+ with :
46
+ install-command : yarn --frozen-lockfile --ignore-scripts
47
+ useRollingCache : true
48
+
49
+ - name : Load build 💽
50
+ uses : actions/download-artifact@v2
51
+ with :
52
+ name : dist
53
+ path : dist
54
+
55
+ - name : Test 🔬
56
+ run : yarn test:${{ matrix.bundle }}
57
+
Original file line number Diff line number Diff line change 1
- name : ci:test
1
+ name : ci:cover
2
2
on :
3
3
- push
4
4
- pull_request
5
5
jobs :
6
- test :
7
- name : Continuous integration (tests )
6
+ cover :
7
+ name : Continuous integration (code coverage )
8
8
runs-on : ubuntu-latest
9
9
steps :
10
10
- name : Checkout 🛎️
11
11
uses : actions/checkout@v2
12
12
13
- - name : Install 🔧
13
+ - name : Install 📦
14
14
uses : bahmutov/npm-install@v1
15
15
with :
16
16
install-command : yarn --frozen-lockfile --ignore-scripts
17
17
useRollingCache : true
18
18
19
- - name : Test 🔬
20
- run : yarn ci:test
19
+ - name : Test and record coverage 🔬
20
+ run : yarn cover
21
21
22
22
- name : Publish coverage report 📃
23
23
uses : codecov/codecov-action@v2
Original file line number Diff line number Diff line change
1
+ name : ci:lint-config
2
+ on :
3
+ - push
4
+ - pull_request
5
+ jobs :
6
+ cover :
7
+ name : Continuous integration (config linting)
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ - name : Checkout 🛎️
11
+ uses : actions/checkout@v2
12
+
13
+ - name : Install 📦
14
+ uses : bahmutov/npm-install@v1
15
+ with :
16
+ install-command : yarn --frozen-lockfile --ignore-scripts
17
+ useRollingCache : true
18
+
19
+ - name : Lint config 👕
20
+ run : yarn lint-config
Original file line number Diff line number Diff line change 1
- name : ci:build
1
+ name : ci:lint
2
2
on :
3
3
- push
4
4
- pull_request
5
5
jobs :
6
- test :
7
- name : Continuous integration (build )
6
+ cover :
7
+ name : Continuous integration (code linting )
8
8
runs-on : ubuntu-latest
9
9
steps :
10
10
- name : Checkout 🛎️
11
11
uses : actions/checkout@v2
12
12
13
- - name : Install 🔧
13
+ - name : Install 📦
14
14
uses : bahmutov/npm-install@v1
15
15
with :
16
16
install-command : yarn --frozen-lockfile --ignore-scripts
17
17
useRollingCache : true
18
18
19
- - name : Build 🏗️
20
- run : yarn ci:build
19
+ - name : Lint 👕
20
+ run : yarn lint
Original file line number Diff line number Diff line change 42
42
"build" : " NODE_ENV=production microbundle" ,
43
43
"build-docs" : " esdoc" ,
44
44
"build-gh-pages" : " npm run build-docs" ,
45
- "ci:build" : " npm run build" ,
46
- "ci:test" : " npm run lint-config && npm run lint && npm run cover" ,
47
45
"commit-msg" : " commitlint --edit" ,
48
46
"cover" : " NODE_ENV=cover c8 --all --src src --reporter lcov --reporter text-summary --reporter text npm test" ,
49
47
"debug" : " NODE_ENV=debug npm test -- -- -- -st --fail-fast" ,
You can’t perform that action at this time.
0 commit comments