Skip to content

Commit 4163973

Browse files
committed
Enable UT for tooling change
Signed-off-by: xil <fridalu66@gmail.com>
1 parent 619bf89 commit 4163973

5 files changed

Lines changed: 694 additions & 661 deletions

File tree

.github/workflows/test-tools.yml

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