Skip to content

Commit

Permalink
Merge pull request #161 from Arquisoft/develop
Browse files Browse the repository at this point in the history
Fixing sonar coverage
  • Loading branch information
paulasuarezp authored Apr 30, 2023
2 parents 98ef0db + 8dca016 commit a85527b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 37 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/lomap_es2c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
Expand All @@ -23,7 +25,7 @@ jobs:
- run: npm --prefix webapp test --coverage --watchAll
- run: npm --prefix restapi test --coverage --watchAll
- name: Analyze with SonarCloud
uses: sonarsource/sonarcloud-github-action@master
uses: sonarsource/sonarcloud-github-action@v1.8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down
15 changes: 15 additions & 0 deletions restapi/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export default {
rootDir: './',
transform: {
"^.+\\.tsx?$": "ts-jest"
},
collectCoverage: true,
collectCoverageFrom: ["src/controllers/*.{ts,tsx}",
"src/facade.ts",
"!server.ts",
"api.ts",
"src/persistence/*.{ts,tsx}",
"src/persistence/DefaultMongo.ts",
"src/entities/*.{ts,tsx}",
]
}
15 changes: 1 addition & 14 deletions restapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,8 @@
"version": "1.0.0",
"scripts": {
"start": "ts-node-dev ./server.ts",
"test": "cd tests && jest --coverage"
"test": "jest --runInBand --coverage"
},

"jest": {
"collectCoverage": true,
"coverageReporters": [
"json",
"lcov",
"text",
"clover"
],
"coverageDirectory": "coverage"
}

,
"keywords": [],
"author": "",
"license": "ISC",
Expand Down
22 changes: 0 additions & 22 deletions restapi/tests/jest.config.ts

This file was deleted.

0 comments on commit a85527b

Please sign in to comment.