1010 - master
1111 - " 2.9"
1212 workflow_dispatch :
13-
1413jobs :
1514 build :
1615 runs-on : ${{ matrix.os }}
@@ -24,80 +23,80 @@ jobs:
2423 fail-fast : false
2524
2625 steps :
27- - uses : actions/checkout@v2
28- - name : Use Node.js
29- uses : actions/setup-node@v1
30- with :
31- node-version : ' 14'
32- - uses : dorny/paths-filter@v2
33- id : changes
34- with :
35- filters : |
36- docs:
37- - ' docs/**'
38- - 'package.json '
39- - 'tsconfig .json'
40- src:
41- - ' src/**'
42- - 'package.json '
43- test:
44- - ' test/**'
45- - 'karma.conf.js '
46- - 'package.json '
47- types:
48- - ' types/**'
49- - 'package.json '
50- - 'tsconfig .json'
51- - name : Install
52- run : npm ci
53- - name : Build
54- run : npm run build
55- - name : Test
56- if : |
57- steps.changes.outputs.src == 'true' | |
58- steps.changes.outputs.test == 'true'
59- run : |
60- npm run build
61- if [ "${{ runner.os }}" == "Windows" ]; then
62- npm test
63- elif [ "${{ runner.os }}" == "macOS" ]; then
64- npm test --browsers chrome,safari
65- else
66- xvfb-run --auto-servernum npm test
67- fi
68- shell : bash
69- - name : Lint
70- run : npm run lint
71- - name : Package
72- if : steps.changes.outputs.docs == 'true'
73- run : |
74- npm run docs
75- npm pack
76- - name : Coveralls Parallel - Chrome
77- if : steps.changes.outputs.src == 'true'
78- uses : coverallsapp/github-action@master
79- with :
80- github-token : ${{ secrets.github_token }}
81- path-to-lcov : ' ./coverage/chrome/lcov.info '
82- flag-name : ${{ matrix.os }}- chrome
83- parallel : true
84- - name : Coveralls Parallel - Firefox
85- if : steps.changes.outputs.src == 'true'
86- uses : coverallsapp/github-action@master
87- with :
88- github-token : ${{ secrets.github_token }}
89- path-to-lcov : ' ./coverage/firefox/lcov.info '
90- flag-name : ${{ matrix.os }}- firefox
91- parallel : true
92-
26+ - uses : actions/checkout@v2
27+ - name : Use Node.js
28+ uses : actions/setup-node@v2
29+ with :
30+ node-version : ' 14'
31+ cache : npm
32+ - uses : dorny/paths-filter@v2
33+ id : changes
34+ with :
35+ filters : |
36+ docs:
37+ - 'docs/** '
38+ - 'package .json'
39+ - 'tsconfig.json'
40+ src:
41+ - 'src/** '
42+ - 'package.json'
43+ test:
44+ - 'test/** '
45+ - 'karma.conf.js '
46+ - 'package.json'
47+ types:
48+ - 'types/** '
49+ - 'package .json'
50+ - 'tsconfig.json'
51+ - name : Install
52+ run : npm ci
53+ - name : Build
54+ run : npm run build
55+ - name : Test
56+ if : |
57+ steps.changes.outputs.src == 'true' ||
58+ steps.changes.outputs.test == 'true'
59+ run : |
60+ npm run build
61+ if [ "${{ runner.os }}" == "Windows" ]; then
62+ npm test
63+ elif [ "${{ runner.os }}" == "macOS" ]; then
64+ npm test --browsers chrome,safari
65+ else
66+ xvfb-run --auto-servernum npm test
67+ fi
68+ shell : bash
69+ - name : Lint
70+ run : npm run lint
71+ - name : Package
72+ if : steps.changes.outputs.docs == 'true'
73+ run : |
74+ npm run docs
75+ npm pack
76+ - name : Coveralls Parallel - Chrome
77+ if : steps.changes.outputs.src == 'true'
78+ uses : coverallsapp/github-action@master
79+ with :
80+ github-token : ${{ secrets.github_token }}
81+ path-to-lcov : ' ./coverage/ chrome/lcov.info '
82+ flag-name : ${{ matrix.os }}-chrome
83+ parallel : true
84+ - name : Coveralls Parallel - Firefox
85+ if : steps.changes.outputs.src == 'true'
86+ uses : coverallsapp/github-action@master
87+ with :
88+ github-token : ${{ secrets.github_token }}
89+ path-to-lcov : ' ./coverage/ firefox/lcov.info '
90+ flag-name : ${{ matrix.os }}-firefox
91+ parallel : true
9392
9493 finish :
9594 needs : build
9695 runs-on : ubuntu-latest
9796 steps :
98- - name : Coveralls Finished
99- if : needs.build.outputs.coveralls == 'true'
100- uses : coverallsapp/github-action@master
101- with :
102- github-token : ${{ secrets.github_token }}
103- parallel-finished : true
97+ - name : Coveralls Finished
98+ if : needs.build.outputs.coveralls == 'true'
99+ uses : coverallsapp/github-action@master
100+ with :
101+ github-token : ${{ secrets.github_token }}
102+ parallel-finished : true
0 commit comments