Skip to content

Commit

Permalink
test: add codecov reports (#1205)
Browse files Browse the repository at this point in the history
* add codecov reports

* add nyc
  • Loading branch information
Jolg42 authored Jul 19, 2022
1 parent e737b29 commit ecb7335
Show file tree
Hide file tree
Showing 8 changed files with 2,586 additions and 125 deletions.
17 changes: 17 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
comment: true

# About `carryforward: true`
# https://docs.codecov.com/docs/carryforward-flags
flags:
scripts:
carryforward: true
paths:
- scripts/
language-server:
carryforward: true
paths:
- packages/language-server/
# vscode:
# carryforward: true
# paths:
# - packages/vscode/
5 changes: 5 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,8 @@ jobs:
- name: Catch version incompatibilities
if: matrix.os == 'ubuntu-latest'
run: npm run testScripts
- uses: codecov/codecov-action@v3
with:
files: ./scripts/__tests__/coverage/clover.xml,./packages/language-server/coverage/clover.xml
flags: ${{ matrix.os }}
name: ${{ matrix.os }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ npm-debug.log*

# Coverage directory used by tools like istanbul
coverage
.nyc_output

# Dependency directory
**/node_modules/**
Expand Down
5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
module.exports = {
testMatch: ['**/__tests__/**/*.test.js'],
collectCoverage: process.env.CI ? true : false,
coverageReporters: ['clover'],
coverageDirectory: 'scripts/__tests__/coverage',
collectCoverageFrom: ['scripts/**/*.js', '!**/__tests__/**/*'],
reporters: ['default', 'github-actions'],
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@
"eslint --fix"
]
}
}
}
4 changes: 3 additions & 1 deletion packages/language-server/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
dist/
node_modules/
node_modules/
.nyc_output/
coverage/
Loading

0 comments on commit ecb7335

Please sign in to comment.