Skip to content

Commit ce08a4b

Browse files
committed
chore(ci): upload coverage to coveralls
1 parent d60bf93 commit ce08a4b

File tree

4 files changed

+2726
-5236
lines changed

4 files changed

+2726
-5236
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: CI
22

3-
on: [push]
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
- next
9+
- rc
410

511
jobs:
612
test:
@@ -13,23 +19,20 @@ jobs:
1319
runs-on: ${{ matrix.os }}
1420

1521
steps:
16-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v3
1723

1824
- name: Set up Node
19-
uses: actions/setup-node@v2
25+
uses: actions/setup-node@v3
2026
with:
2127
node-version: ${{ matrix.node }}
2228

2329
- name: Run tests
2430
run: |
25-
npm ci
26-
npm t
31+
npm clean-install
32+
npm run test:coverage
2733
28-
- name: Test & publish code coverage
29-
uses: paambaati/[email protected]
30-
env:
31-
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
34+
- name: Upload coverage results to Coveralls
35+
uses: coverallsapp/github-action@master
3236
with:
33-
coverageCommand: yarn run coverage
34-
coverageLocations: |
35-
${{github.workspace}}/test/coverage/lcov.info:lcov
37+
github-token: ${{ secrets.GITHUB_TOKEN }}
38+
path-to-lcov: ./test/coverage/lcov.info

jest.config.js renamed to jest.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
module.exports = {
1+
import type { Config } from '@jest/types'
2+
3+
const config: Config.InitialOptions = {
24
preset: 'ts-jest',
35
testEnvironment: 'node',
46
clearMocks: true,
@@ -13,3 +15,4 @@ module.exports = {
1315
'!**/vendor/**',
1416
],
1517
}
18+
export default config

0 commit comments

Comments
 (0)