File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,9 +2,16 @@ name: "CodeQL"
22
33on :
44 push :
5+ branches :
6+ - main
7+ - " !dependabot/**"
58 pull_request :
9+ branches :
10+ - main
11+ - " !dependabot/**"
612 schedule :
713 - cron : " 0 0 * * 0"
14+ workflow_dispatch :
815
916jobs :
1017 analyze :
@@ -18,11 +25,19 @@ jobs:
1825 steps :
1926 - name : Checkout repository
2027 uses : actions/checkout@v3
28+ with :
29+ persist-credentials : false
2130
2231 - name : Initialize CodeQL
2332 uses : github/codeql-action/init@v2
2433 with :
2534 languages : " javascript"
35+ queries : +security-and-quality
36+
37+ - name : Autobuild
38+ uses : github/codeql-action/autobuild@v2
2639
2740 - name : Perform CodeQL Analysis
2841 uses : github/codeql-action/analyze@v2
42+ with :
43+ category : " /language:javascript"
Original file line number Diff line number Diff line change 11name : Lint
22
3- on : [push, pull_request]
3+ on : [push, pull_request, workflow_dispatch ]
44
55env :
66 FORCE_COLOR : 2
7- NODE : 16
7+ NODE : 18 # The Node.js version to run lint on
88
99jobs :
10- lint :
10+ run :
11+ name : Lint
1112 runs-on : ubuntu-latest
1213
1314 steps :
1415 - name : Clone repository
1516 uses : actions/checkout@v3
17+ with :
18+ persist-credentials : false
1619
1720 - name : Set up Node.js
1821 uses : actions/setup-node@v3
1922 with :
20- node-version : " ${{ env.NODE }}"
23+ node-version : ${{ env.NODE }}
2124 cache : npm
2225
2326 - name : Install npm dependencies
2427 run : npm ci
2528
26- - name : Lint
29+ - name : Run lint
2730 run : npm run lint
Original file line number Diff line number Diff line change 11name : Tests
22
3- on : [push, pull_request]
3+ on : [push, pull_request, workflow_dispatch ]
44
55env :
66 FORCE_COLOR : 2
7+ NODE_COV : 18 # The Node.js version to run coveralls on
78
89jobs :
910 test :
3031 steps :
3132 - name : Clone repository
3233 uses : actions/checkout@v3
34+ with :
35+ persist-credentials : false
3336
3437 - name : Set up Node.js
3538 uses : actions/setup-node@v3
@@ -50,14 +53,14 @@ jobs:
5053
5154 - name : Run full tests
5255 run : npm run test:coverage
53- if : matrix.os == 'ubuntu-latest'
56+ if : startsWith( matrix.os, 'ubuntu')
5457
5558 - name : Run tests
5659 run : npm run mocha
57- if : matrix.os == 'windows-latest'
60+ if : startsWith( matrix.os, 'windows')
5861
5962 - name : Run Coveralls
6063 uses :
coverallsapp/[email protected] 61- if : matrix.os == 'ubuntu-latest' && matrix.node == 16
64+ if : startsWith( matrix.os, 'ubuntu') && matrix.node == env.NODE_COV
6265 with :
6366 github-token : " ${{ secrets.GITHUB_TOKEN }}"
You can’t perform that action at this time.
0 commit comments