Skip to content

Commit af0fb9d

Browse files
committed
Support coveralls reporting
1 parent 123d726 commit af0fb9d

File tree

3 files changed

+47
-1
lines changed

3 files changed

+47
-1
lines changed

.github/workflows/push.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
with:
1616
node-version: 22
1717
- run: npm run lint
18+
1819
nodejs:
1920
strategy:
2021
fail-fast: false
@@ -46,9 +47,31 @@ jobs:
4647
- run: npm run test:cover
4748
env:
4849
FORCE_COLOR: true
50+
- uses: actions/upload-artifact@v4
51+
if: vars.ENABLE_COVERALLS == 'true'
52+
with:
53+
name: lcov-${{ matrix.node }}
54+
path: coverage/lcov.info
55+
if-no-files-found: error
4956
- run: npm run migration up
5057
- run: npm run e2e
5158
- run: npm run e2e:dev
59+
60+
coverage:
61+
runs-on: ubuntu-latest
62+
if: vars.ENABLE_COVERALLS == 'true'
63+
needs: [nodejs]
64+
steps:
65+
- uses: actions/checkout@v4
66+
- run: |
67+
curl -L https://coveralls.io/coveralls-linux.tar.gz | tar -xz -C /usr/local/bin
68+
- uses: actions/download-artifact@v4
69+
with:
70+
name: lcov-22
71+
- run: coveralls report coverage/lcov.info
72+
env:
73+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
74+
5275
docker:
5376
runs-on: ubuntu-latest
5477
services:

bin/files/push.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,32 @@ jobs:
3434
- run: npm run test:cover
3535
env:
3636
FORCE_COLOR: true
37+
- uses: actions/upload-artifact@v4
38+
if: vars.ENABLE_COVERALLS == 'true'
39+
with:
40+
name: lcov-${{ matrix.node }}
41+
path: coverage/lcov.info
42+
if-no-files-found: error
3743
- run: npm run migration up
3844
- run: npm run e2e
3945
- run: npm run e2e:dev
46+
47+
coverage:
48+
runs-on: ubuntu-latest
49+
if: vars.ENABLE_COVERALLS == 'true'
50+
needs: [nodejs]
51+
steps:
52+
- uses: actions/checkout@v4
53+
- run: |
54+
curl -L https://coveralls.io/coveralls-linux.tar.gz | tar -xz -C /usr/local/bin
55+
- uses: actions/download-artifact@v4
56+
with:
57+
name: lcov-22
58+
path: coverage/
59+
- run: coveralls report coverage/lcov.info
60+
env:
61+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
62+
4063
docker:
4164
runs-on: ubuntu-latest
4265
services:

vite.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default defineConfig({
1111
...coverageConfigDefaults.exclude,
1212
],
1313
provider: "v8",
14-
reporter: ["text", "html"],
14+
reporter: ["text", "html", "lcovonly"],
1515
reportsDirectory: "./coverage",
1616
},
1717
workspace: ["*/vite.config.js"],

0 commit comments

Comments
 (0)