Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- master # or the name of your main branch
- feature/add-test-coverage # or the name of your feature branch
pull_request:
types: [opened, synchronize, reopened]
jobs:
Expand All @@ -14,6 +15,12 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: npm ci
working-directory: client
- name: Run tests
run: npm run test:sonar
working-directory: client
- uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down
57 changes: 32 additions & 25 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"test:sonar": "react-scripts test --coverage --watchAll=false",
"eject": "react-scripts eject"
},
"eslintConfig": {
Expand Down
3 changes: 2 additions & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
sonar.projectKey=jeff-zapotoczny-sonarsource_js-sample_AYH5SMH1AIPFNygHs2A3
sonar.projectKey=SonarSource-Demos_javascript-app_AYI8UgHPWHbe6_1YL8bt
sonar.projectName=Javascript App
sonar.projectVersion=1.0.0

sonar.sources=.
sonar.javascript.lcov.reportPaths=client/coverage/lcov.info