Skip to content

Commit 7f5e4c2

Browse files
committed
improvements
1 parent 1d0203b commit 7f5e4c2

File tree

5 files changed

+42
-56
lines changed

5 files changed

+42
-56
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,18 @@ jobs:
4646
uses: actions/download-artifact@v3
4747
with:
4848
name: cover.macos-latest
49-
49+
50+
- name: download cover.windows-latest
51+
uses: actions/download-artifact@v3
52+
with:
53+
name: cover.windows-latest
54+
5055
- name: check test coverage
5156
id: coverage
5257
uses: vladopajic/go-test-coverage@v2
5358
with:
5459
config: ./.github/.testcoverage.yml
55-
profile: cover.ubuntu-latest.profile,cover.macos-latest.profile
60+
profile: cover.ubuntu-latest.profile,cover.macos-latest.profile,cover.windows-latest.profile
5661
git-branch: badges
5762
git-token: ${{ github.ref_name == 'main' && secrets.GITHUB_TOKEN || '' }}
5863

pkg/testcoverage/path/path.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ func Normalize(path string) string {
1313
return path
1414
}
1515

16-
return strings.ReplaceAll(path, "/", separatorToReplace) // coverage-ignore
16+
return strings.ReplaceAll(path, "/", separatorToReplace)
1717
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//go:build windows
2+
3+
package path_test
4+
5+
import (
6+
"testing"
7+
8+
"github.com/stretchr/testify/assert"
9+
10+
. "github.com/vladopajic/go-test-coverage/v2/pkg/testcoverage/path"
11+
)
12+
13+
func Test_Normalize(t *testing.T) {
14+
t.Parallel()
15+
16+
assert.Equal(t, "foo\\bar", Normalize("foo/bar"))
17+
}

pkg/testcoverage/path/path_test.go

Lines changed: 0 additions & 53 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//go:build !windows
2+
3+
package path_test
4+
5+
import (
6+
"testing"
7+
8+
"github.com/stretchr/testify/assert"
9+
10+
. "github.com/vladopajic/go-test-coverage/v2/pkg/testcoverage/path"
11+
)
12+
13+
func Test_Normalize(t *testing.T) {
14+
t.Parallel()
15+
16+
assert.Equal(t, "foo/bar", Normalize("foo/bar"))
17+
}

0 commit comments

Comments
 (0)