Skip to content

Commit

Permalink
feat(GH-8): Use Qodana code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
gavanlamb committed Jun 15, 2024
1 parent 76eeef5 commit 59f70f2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
17 changes: 4 additions & 13 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ jobs:
fetch-depth: 0
fetch-tags: true

- name: Qodana Scan
uses: JetBrains/qodana-action@v2024.1
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -61,14 +56,10 @@ jobs:
files: |
./test-results/junit.xml
- name: Publish test coverage
uses: ArtiomTr/jest-coverage-report-action@v2
if: always()
with:
skip-step: all
coverage-file: ./test-results/summary.json
base-coverage-file: ./test-results/summary.json
prnumber: ${{ github.event.pull_request.number }}
- name: Qodana Scan
uses: JetBrains/qodana-action@v2024.1
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}

- name: Package
run: npm run package
Expand Down
2 changes: 2 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const config: Config.InitialOptions = {
},
collectCoverage: true,
collectCoverageFrom: ['./src/**'],
coverageReporters: ['lcovonly', 'lcov', 'html-spa'],
coverageDirectory: '.qodana/code-coverage/',
reporters: [
'default',
['jest-junit', {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"scripts": {
"lint": "npx eslint . -c .eslintrc.yml",
"package": "npx ncc build src/index.ts -o dist --source-map --license licenses.txt",
"test": "npx jest --json --outputFile=./test-results/summary.json",
"test": "npx jest",
"all": "npm run lint && npm run test && npm run package"
},
"license": "MIT",
Expand Down

0 comments on commit 59f70f2

Please sign in to comment.