Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit e3633d4

Browse files
author
Noah Lee
authored
Enhance the unit test (#259)
* Exclude auto generate packages in the unit-test * Fix UI to cache packages
1 parent bb91020 commit e3633d4

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/test.yaml

+5-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
go-version: '1.15'
2525
-
26-
run: go test -cpu 4 ./...
26+
run: go test -cpu 4 -coverprofile .testCoverage.txt $(go list ./... | grep -v model/ent | grep -v mock)
2727
env:
2828
GIN_MODE: release
2929

@@ -36,9 +36,11 @@ jobs:
3636
uses: actions/setup-node@v2
3737
with:
3838
node-version: '14.17.0'
39+
cache: 'npm'
40+
cache-dependency-path: ui/package-lock.json
3941
-
4042
run: npm install
41-
working-directory: ./ui
43+
working-directory: ui
4244
-
4345
run: npm run lint
44-
working-directory: ./ui
46+
working-directory: ui

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
# Test binary, built with `go test -c`
99
*.test
10+
.testCoverage.txt
1011

1112
# Output of the go coverage tool, specifically when used with LiteIDE
1213
*.out

0 commit comments

Comments
 (0)