Skip to content

Commit 6bf02b9

Browse files
authored
chore: upload coverage to coveralls (#217)
1 parent b225a4d commit 6bf02b9

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,9 @@ jobs:
3636
- name: Run tests
3737
run: |
3838
npm t
39+
40+
- name: Upload coverage results to Coveralls
41+
uses: coverallsapp/github-action@master
42+
with:
43+
github-token: ${{ secrets.GITHUB_TOKEN }}
44+
path-to-lcov: ./test/coverage/lcov.info

jest.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
module.exports = {
22
preset: 'ts-jest',
33
testEnvironment: 'jsdom',
4+
ollectCoverage: true,
5+
coverageDirectory: './test/coverage',
6+
coverageReporters: ['lcov'],
7+
collectCoverageFrom: [
8+
'./src/**/*.{js,ts}',
9+
'./tests/**/*.test.ts',
10+
'!**/node_modules/**',
11+
'!**/vendor/**',
12+
'!**/vendor/**',
13+
],
414
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"build:umd": "webpack",
3030
"types-generate": "dts-gen -m '@supabase/storage-js' -s",
3131
"test": "run-s test:clean test:infra test:suite test:clean",
32-
"test:suite": "jest --runInBand",
32+
"test:suite": "jest --runInBand --coverage",
3333
"test:infra": "cd infra && docker compose down && docker compose up -d --build && sleep 10",
3434
"test:clean": "cd infra && docker compose down --remove-orphans",
3535
"docs": "typedoc --entryPoints src/index.ts --out docs/v2 --entryPoints src/packages/* --excludePrivate --excludeProtected",

0 commit comments

Comments
 (0)