Skip to content
Merged
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
16 changes: 15 additions & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,18 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
- run: npm ci
- run: npm run format:check
- run: npm test
- run: npm test --coverage
# sonarcloud scan
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TEST_COVERAGE }}
with:
args: >
-Dsonar.projectKey=bitvavo_node-bitvavo-api
-Dsonar.organization=bitvavo
-Dsonar.sources=.
-Dsonar.exclusions=**/node_modules/**,**/dist/**,**/coverage/**,**/e2e/**,**/cypress/**,**/github-trigger/**
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
-Dsonar.sourceEncoding=UTF-8
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ node_modules/
### IDE ###
.idea/
.vscode/
coverage/
10 changes: 10 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ const config = {

// The glob patterns Jest uses to detect test files
testMatch: ['<rootDir>/test/*.spec.js'],

testEnvironment: 'node', // Set the environment for Node.js
collectCoverage: true, // Enable code coverage
coverageDirectory: 'coverage', // Directory to save coverage reports
collectCoverageFrom: [
'!**/node_modules/**', // Exclude node_modules
'!**/dist/**', // Exclude built files
'!jest.config.js', // Exclude the config file
],
coverageReporters: ['lcov'], // Specify formats for coverage reports
}

module.exports = config
Loading