Skip to content

Commit a41b4b9

Browse files
authored
Add Codecov integration and fix line endings for Go modules (#56)
* Add Codecov upload step to CI workflow * fix: ensure go.mod and go.sum files are treated as text with LF line endings * fix: change go.sum file handling to binary in .gitattributes
1 parent 24168f8 commit a41b4b9

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
# Source code
55
*.go text eol=lf
6+
go.mod text eol=lf
7+
go.sum text eol=lf
68
*.yaml text eol=lf
79
*.yml text eol=lf
810
*.json text eol=lf
@@ -20,7 +22,6 @@ LICENSE text eol=lf
2022

2123
# Lock files (preserve as-is)
2224
*.lock binary
23-
go.sum binary
2425

2526
# Binary files
2627
*.exe binary

.github/workflows/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,17 @@ jobs:
124124
go test -short -v -race -coverprofile=../coverage/coverage.out ./...
125125
fi
126126
127+
- name: Upload coverage to Codecov
128+
if: github.repository == 'jongio/azd-app'
129+
uses: codecov/codecov-action@v4
130+
with:
131+
file: coverage/coverage.out
132+
flags: unittests
133+
name: codecov-${{ matrix.os }}-go-${{ matrix.go-version }}
134+
token: ${{ secrets.CODECOV_TOKEN }}
135+
fail_ci_if_error: false
136+
verbose: true
137+
127138
lint:
128139
name: Lint
129140
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)