Skip to content

Commit

Permalink
升级测试覆盖率
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Jan 8, 2024
1 parent a96a16f commit eed20b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ jobs:

- name: Run coverage
#run: cd test && go test -race -coverprofile=coverage.txt -covermode=atomic
run: go test -race -covermode=count -coverprofile=coverage.txt -covermode=atomic -run="^Test" -coverpkg=$(go list ./... | grep -v "/test" | tr '\n' ',') ./test
run: go test -covermode=count -coverprofile=coverage.txt -covermode=atomic -run="^Test" -coverpkg=$(go list ./... | grep -v "/test" | tr '\n' ',') ./test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
4 changes: 2 additions & 2 deletions test/configure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func TestConfigureFSEnv(t *testing.T) {
}

func TestGetArray(t *testing.T) {
fs.Initialize[modules.FarseerKernelModule]("unit test")
//fs.Initialize[modules.FarseerKernelModule]("unit test")
assert.Equal(t, "", configure.GetString("a.b.c"))
configure.SetDefault("a.b.c", "123")
assert.Equal(t, "123", configure.GetString("a.b.c"))
Expand All @@ -30,7 +30,7 @@ func TestGetArray(t *testing.T) {
}

func TestConfigureGet(t *testing.T) {
fs.Initialize[modules.FarseerKernelModule]("unit test")
//fs.Initialize[modules.FarseerKernelModule]("unit test")
arr := configure.GetStrings("Database.default")
assert.Equal(t, "DataType=mysql", arr[0])
assert.Equal(t, "PoolMaxSize=50", arr[1])
Expand Down

0 comments on commit eed20b8

Please sign in to comment.