File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : main
2+ on : [push, pull_request]
3+ jobs :
4+ test :
5+ runs-on : ubuntu-latest
6+ strategy :
7+ fail-fast : false
8+ matrix :
9+ node-version : [^10, ^12, ^14]
10+ steps :
11+ - uses : actions/checkout@v2
12+
13+ - uses : actions/setup-node@v1
14+ with :
15+ node-version : ${{ matrix.node-version }}
16+ - run : yarn install --ignore-engines
17+ - run : yarn lint
18+ - run : yarn test
19+ - run : yarn coverage
20+ - name : Coveralls
21+ uses : coverallsapp/github-action@master
22+ with :
23+ github-token : ${{ secrets.GITHUB_TOKEN }}
24+ flag-name : run-${{ matrix.node-version }}
25+ parallel : true
26+
27+ semantic-release :
28+ needs : [test]
29+ runs-on : ubuntu-latest
30+ steps :
31+ - uses : actions/checkout@v2
32+
33+ - name : Run semantic-release
34+ if : github.repository == 'casbin/node-casbin' && github.event_name == 'push'
35+ run : yarn install --no-lockfile && yarn semantic-release
36+ env :
37+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
38+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
39+
40+ finish :
41+ needs : test
42+ runs-on : ubuntu-latest
43+ steps :
44+ - name : Coveralls Finished
45+ uses : coverallsapp/github-action@master
46+ with :
47+ github-token : ${{ secrets.github_token }}
48+ parallel-finished : true
Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ node_modules
44lib
55yarn-error.log
66package-lock.json
7+ coverage
Load diff This file was deleted.
Original file line number Diff line number Diff line change 1616 "fmt" : " eslint . --ext .js,.ts --fix" ,
1717 "semantic-release" : " semantic-release" ,
1818 "commit" : " git-cz" ,
19- "clean" : " rimraf lib"
19+ "clean" : " rimraf lib" ,
20+ "coverage" : " jest --coverage"
2021 },
2122 "devDependencies" : {
2223 "@semantic-release/changelog" : " ^3.0.6" ,
You can’t perform that action at this time.
0 commit comments