Skip to content

Commit

Permalink
Added coverage setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ozziest committed Dec 10, 2023
1 parent 65f1d90 commit 3b5acb5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,20 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run lint

sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: yarn
- name: Test and coverage
run: npm run test:coverage
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
dist
dist
coverage
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"dev": "tsc --watch",
"test": "jest",
"test:dev": "jest --watch",
"test:coverage": "jest --coverage",
"lint": "eslint .",
"prepare": "husky install"
},
Expand Down

0 comments on commit 3b5acb5

Please sign in to comment.