File tree Expand file tree Collapse file tree 5 files changed +51
-2
lines changed
Expand file tree Collapse file tree 5 files changed +51
-2
lines changed Original file line number Diff line number Diff line change 99 - ' *'
1010
1111jobs :
12+ sonar :
13+ runs-on : ubuntu-latest
14+ steps :
15+
16+ - name : Checkout
17+ uses : actions/checkout@v3
18+ with :
19+ fetch-depth : 0
20+
21+ - name : Setup Node
22+ uses : actions/setup-node@v3
23+ with :
24+ node-version : 20.x
25+
26+ - name : Install dependencies
27+ run : npm ci
28+
29+ - name : Test
30+ run : npm run cover
31+
32+ - name : SonarCloud Scan
33+ uses : SonarSource/sonarcloud-github-action@master
34+ env :
35+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
36+ SONAR_TOKEN : ${{ secrets.SONARCLOUD_TOKEN }}
37+
1238 build :
1339 strategy :
1440 matrix :
Original file line number Diff line number Diff line change 1212 {
1313 "type" : " Fix" ,
1414 "release" : " patch"
15+ },
16+ {
17+ "type" : " Build" ,
18+ "release" : " false"
19+ },
20+ {
21+ "type" : " Docs" ,
22+ "release" : " false"
23+ },
24+ {
25+ "type" : " Upgrade" ,
26+ "release" : " false"
1527 }
1628 ]
1729 }
Original file line number Diff line number Diff line change 11# htmlSanityCheck.js
22
33[ ![ Build status] ( https://github.com/uniqueck/htmlSanityCheck.js/actions/workflows/ci.yaml/badge.svg?branch=main )] ( https://github.com/uniqueck/htmlSanityCheck.js/actions/workflows/ci.yaml )
4- [ ![ npm version] ( http://img.shields.io/npm/v/htmlsanitycheck.svg )] ( https://www.npmjs.com/package/htmlsanitycheck )
4+ [ ![ npm version] ( http://img.shields.io/npm/v/htmlsanitycheck.svg )] ( https://www.npmjs.com/package/htmlsanitycheck )
5+ [ ![ Quality Gate Status] ( https://sonarcloud.io/api/project_badges/measure?project=uniqueck_htmlSanityCheck.js&metric=alert_status )] ( https://sonarcloud.io/summary/new_code?id=uniqueck_htmlSanityCheck.js )
Original file line number Diff line number Diff line change 11module . exports = {
2- reportDir : 'reports/coverage'
2+ reportDir : 'reports/coverage' ,
3+ exclude : [
4+ 'cucumber.js' ,
5+ 'test/**/*.js'
6+ ]
37}
Original file line number Diff line number Diff line change 1+ sonar.projectKey =uniqueck_htmlSanityCheck.js
2+ sonar.organization =uniqueck-github
3+ sonar.projectName =HtmlSanityCheck.js
4+ sonar.javascript.lcov.reportPaths =reports/coverage/lcov.info
5+ sonar.sources =lib,bin
6+ sonar.tests =test
You can’t perform that action at this time.
0 commit comments