Skip to content

Commit c10a1f0

Browse files
Updated jest Config: adding coverage
1 parent 473069f commit c10a1f0

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.github/workflows/build.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,21 @@ on: [pull_request, push]
55
jobs:
66
build:
77
runs-on: ubuntu-latest
8-
8+
99
steps:
1010
- uses: actions/checkout@v2
1111

1212
- name: Install node
1313
uses: actions/setup-node@v1
1414
with:
15-
node-version: '18.x'
15+
node-version: '18.x'
1616

1717
- name: Install dependencies
18-
run: npm install
18+
run: npm install
1919

2020
- name: Test
2121
run: npm run test
2222

23-
- name: Coveralls GitHub Action
24-
uses: coverallsapp/github-action@v2
25-
with:
26-
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
23+
- run: npx coveralls < coverage/lcov.info
24+
env:
25+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

jest.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@ const config: Config.InitialOptions = {
1616
'\\.(css|less|sass|scss)$': 'identity-obj-proxy',
1717
'^.+\\.svg$': 'jest-transformer-svg',
1818
},
19+
collectCoverage: true,
20+
coverageReporters: ['lcov', 'text'],
21+
coverageDirectory: './coverage'
1922
}
2023
export default config

0 commit comments

Comments
 (0)