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 : CI
2+
3+ on :
4+ push :
5+ branches : [main, develop]
6+ pull_request :
7+ branches : [main, develop]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+
15+ - uses : actions/setup-node@v4
16+ with :
17+ node-version : ' 20'
18+ cache : ' npm'
19+
20+ - run : npm ci
21+
22+ - name : Lint
23+ run : npm run lint
24+
25+ - name : Unit tests
26+ run : npm test
27+
28+ - name : Build
29+ run : npm run build
30+
31+ - uses : actions/upload-artifact@v4
32+ with :
33+ name : unit-coverage
34+ path : coverage/unit
35+ if-no-files-found : warn
Original file line number Diff line number Diff line change 1+ name : E2E
2+
3+ on :
4+ push :
5+ branches : [main, develop]
6+ pull_request :
7+ branches : [main, develop]
8+
9+ jobs :
10+ cypress :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+
15+ - uses : actions/setup-node@v4
16+ with :
17+ node-version : ' 20'
18+ cache : ' npm'
19+
20+ - run : npm ci
21+
22+ - name : Cypress E2E tests
23+ uses : cypress-io/github-action@v6
24+ with :
25+ build : npm run build
26+ start : npm start
27+ wait-on : ' http://localhost:3000'
28+ wait-on-timeout : 120
29+ browser : chrome
30+ install : false
31+
32+ - uses : actions/upload-artifact@v4
33+ if : failure()
34+ with :
35+ name : cypress-screenshots
36+ path : cypress/screenshots
37+
38+ - uses : actions/upload-artifact@v4
39+ if : failure()
40+ with :
41+ name : cypress-videos
42+ path : cypress/videos
43+
44+ - uses : actions/upload-artifact@v4
45+ if : always()
46+ with :
47+ name : cypress-coverage
48+ path : coverage/cypress
49+ if-no-files-found : warn
Original file line number Diff line number Diff line change 1+ name : Sonar
2+
3+ on :
4+ push :
5+ branches : [main, develop]
6+ pull_request :
7+ branches : [main, develop]
8+
9+ jobs :
10+ sonar :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+ with :
15+ fetch-depth : 0
16+
17+ - uses : actions/setup-node@v4
18+ with :
19+ node-version : ' 20'
20+ cache : ' npm'
21+
22+ - run : npm ci
23+
24+ - name : Unit tests
25+ run : npm test
26+
27+ - name : SonarQube scan
28+ uses : SonarSource/sonarqube-scan-action@v5
29+ env :
30+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
31+ SONAR_HOST_URL : https://sonar.tools.sap
Load diff This file was deleted.
Load diff This file was deleted.
Original file line number Diff line number Diff line change 88# license agreement you entered into with SAP.
99#
1010
11- # Sonar - CDCTOOLBOX-46
12- sonar.projectKey =cdc-tools-chrome-extension
13- sonar.pullrequest.github.repository =cx-servicesautomation/sap-customer-data-cloud-toolkit
14- sonar.sources =src
1511sonar.host.url =https://sonar.tools.sap
12+
13+ sonar.projectKey =sap-customer-data-cloud-toolkit-sap-customer-data-cloud-toolkit-ed98d
14+ sonar.projectName =sap-customer-data-cloud-toolkit
15+
16+ sonar.sources =src
1617sonar.exclusions =**/*.test.js,**/__mocks__/*,src/lib/tracker.js
1718
1819# tests related info
1920sonar.tests =src
2021sonar.test.inclusions =**/*.test.js
2122sonar.javascript.lcov.reportPaths =coverage/cypress/lcov.info,coverage/unit/lcov.info
22- # sonar.testExecutionReportPaths=testResults/sonar-report.xml
You can’t perform that action at this time.
0 commit comments