Skip to content

Commit 51c4107

Browse files
committed
ci: enable Jest code coverage with Codecov.com
1 parent fb371f4 commit 51c4107

File tree

10 files changed

+14
-5
lines changed

10 files changed

+14
-5
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ SearchBar
66
*.min.js
77

88
# Ignore generated files
9+
coverage
910
dist
1011
build
1112
tmp

.github/workflows/continuous-delivery.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ jobs:
149149
run: |
150150
pnpm run --if-present test
151151
152+
- name: Upload coverage reports to Codecov
153+
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.0.1
154+
with:
155+
token: ${{ secrets.CODECOV_TOKEN }}
156+
152157
visual-regression-test:
153158
runs-on: ubuntu-latest
154159
needs: install

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ node_modules/
33
.npm/
44

55
# Ignore generated files
6+
coverage/
67
dist/
78
generated/
89
tmp/

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ SearchBar
66
*.min.js
77

88
# Ignore generated files
9+
coverage
910
dist
1011
build
1112
tmp

.stylelintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
node_modules/
33

44
# Ignore generated files
5+
coverage/
56
dist/
67
tmp/
78
build/

packages/component-library-angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"lint-build:spec": "tsc --noEmit --project tsconfig.spec.json",
2727
"watch:build": "ng build --watch",
2828
"test-results": "jest --json --outputFile=dist/.jest-test-results.json --silent",
29-
"test": "jest --verbose",
29+
"test": "jest --coverage --verbose",
3030
"test-build": "node test-exports.mjs",
3131
"watch:test": "NODE_OPTIONS=--experimental-vm-modules jest --verbose --watch"
3232
},

packages/component-library-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"build:test-results": "mkdir -p dist pages && NODE_OPTIONS=--experimental-vm-modules jest --json --outputFile=dist/.jest-test-results.json --silent",
2525
"clean": "rimraf dist/ pages/",
2626
"lint-build": "tsc --project ./tsconfig.json --noEmit && tsc --noEmit --project ./tsconfig.test.json",
27-
"test": "mkdir -p pages && jest --verbose",
27+
"test": "mkdir -p pages && jest --coverage --verbose",
2828
"watch:build": "rollup -c --watch",
2929
"watch:test": "NODE_OPTIONS=--experimental-vm-modules jest --verbose --watch"
3030
},

packages/component-library-react/packages/button-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"scripts": {
1616
"build": "rollup -c ./rollup.config.mjs",
1717
"clean": "rimraf dist",
18-
"test": "mkdir -p pages && NODE_OPTIONS=--experimental-vm-modules jest --verbose"
18+
"test": "mkdir -p pages && NODE_OPTIONS=--experimental-vm-modules jest --coverage --verbose"
1919
},
2020
"devDependencies": {
2121
"@utrecht/button-css": "workspace:*",

packages/component-library-react/packages/calendar-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"scripts": {
1616
"build": "rollup -c ./rollup.config.mjs",
1717
"clean": "rimraf dist",
18-
"test": "mkdir -p pages && jest --verbose"
18+
"test": "mkdir -p pages && jest --coverage --verbose"
1919
},
2020
"devDependencies": {
2121
"@utrecht/button-react": "workspace:*",

packages/component-library-vue/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"lint:ts": "vue-tsc --noEmit -p tsconfig.lib.json --composite false",
3232
"lint:ts-jest": "vue-tsc --noEmit -p tsconfig.jest.json --composite false",
3333
"preview": "vite preview --port 5050",
34-
"test": "jest --verbose",
34+
"test": "jest --coverage --verbose",
3535
"watch:test": "jest --verbose --watch"
3636
},
3737
"main": "./dist/component-library-vue.umd.js",

0 commit comments

Comments
 (0)