Skip to content

Commit c95cf91

Browse files
committed
get test report
1 parent 43c1d15 commit c95cf91

4 files changed

Lines changed: 695 additions & 656 deletions

File tree

.github/workflows/test.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Test Tools (Unit)
2+
3+
on:
4+
push:
5+
branches: ['**']
6+
paths:
7+
- '.github/workflows/test*.yml'
8+
- 'eslint.config.mjs'
9+
- 'jest.config.js'
10+
- 'package*.json'
11+
- 'tools/**'
12+
- 'tsconfig.json'
13+
pull_request:
14+
branches: ['**']
15+
paths:
16+
- '.github/workflows/test*.yml'
17+
- 'eslint.config.mjs'
18+
- 'jest.config.js'
19+
- 'package*.json'
20+
- 'tools/**'
21+
- 'tsconfig.json'
22+
23+
jobs:
24+
test:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout Repo
28+
uses: actions/checkout@v4
29+
30+
- name: Setup Node.js
31+
uses: actions/setup-node@v3
32+
with:
33+
node-version: '20'
34+
35+
- name: Install Dependencies
36+
run: npm ci
37+
38+
- name: Run Tests
39+
run: npm run test:unit -- --coverage
40+
41+
- name: Upload coverage to Codecov
42+
uses: codecov/codecov-action@v4.0.1
43+
with:
44+
token: ${{ secrets.CODECOV_TOKEN }}

jest.config.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
module.exports = {
44
preset: 'ts-jest',
55
testEnvironment: 'node',
6-
moduleDirectories: ['node_modules', './tools/src'],
7-
collectCoverageFrom: ['tools/src/**']
6+
moduleDirectories: ['node_modules', './tools/proto-convert/src'],
7+
collectCoverageFrom: [
8+
'tools/proto-convert/src/**/*.ts',
9+
'!tools/proto-convert/src/**/*.d.ts'
10+
],
11+
testMatch: ['**/test/**/*.test.ts']
812
}

0 commit comments

Comments
 (0)