File tree Expand file tree Collapse file tree 4 files changed +71
-31
lines changed
Expand file tree Collapse file tree 4 files changed +71
-31
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ release :
5+ types : [created]
6+
7+ jobs :
8+ test :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v2
12+ - uses : actions/setup-node@v2
13+ with :
14+ node-version : 14
15+ - run : npm install -g yarn
16+ - run : yarn
17+ - run : yarn run eslint
18+ - run : yarn global add mocha
19+ - run : yarn test
20+
21+ publish-npm :
22+ needs : test
23+ runs-on : ubuntu-latest
24+ steps :
25+ - uses : actions/checkout@v2
26+ - uses : actions/setup-node@v2
27+ with :
28+ node-version : 14
29+ registry-url : https://registry.npmjs.org/
30+ - run : yarn install --frozen-lockfile
31+ - run : yarn publish
32+ env :
33+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : Test
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+ branches : [ master ]
8+
9+ jobs :
10+ test :
11+ runs-on : ubuntu-latest
12+ strategy :
13+ matrix :
14+ node-version : [12, 14]
15+ steps :
16+ - uses : actions/checkout@v2
17+ - name : Node.js ${{ matrix.node-version }}
18+ uses : actions/setup-node@v2
19+ with :
20+ node-version : ${{ matrix.node-version }}
21+ cache : ' npm'
22+ - run : npm install -g yarn
23+ - run : yarn
24+ - run : yarn run eslint
25+ - run : yarn global add mocha
26+ - name : Run yarn test
27+ if : ${{ !startsWith(matrix.node-version, '14') }}
28+ run : yarn test
29+ - name : Run yarn coverage
30+ if : ${{ startsWith(matrix.node-version, '14') }}
31+ uses : paambaati/codeclimate-action@v3.0.0
32+ env :
33+ CC_TEST_REPORTER_ID : 0d3707693eec3617898169fa9d7f91a86d5a98a252beb81bd9fe89009647a456
34+ with :
35+ coverageCommand : yarn coverage
36+ coverageLocations : ${{ github.workspace }}/coverage/lcov.info:lcov
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 3232 ],
3333 "license" : " ISC" ,
3434 "scripts" : {
35- "test" : " nyc --reporter=lcov mocha tests/index" ,
35+ "test" : " mocha tests/index" ,
36+ "coverage" : " nyc --reporter=lcov mocha tests/index" ,
3637 "eslint" : " $(npm bin)/eslint ."
3738 },
3839 "engines" : {
You can’t perform that action at this time.
0 commit comments