Skip to content

Commit f2bdf7e

Browse files
authored
fix pipeline (#17)
upgrade deps, tools
1 parent c3c6069 commit f2bdf7e

File tree

6 files changed

+40
-26
lines changed

6 files changed

+40
-26
lines changed

.github/workflows/test_and_build.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Install Go
15-
uses: actions/setup-go@v1
15+
uses: actions/setup-go@v4
1616
with:
17-
go-version: 1.16.x
17+
go-version: 1.20.x
1818
- name: Checkout code
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v3
2020
- name: golangci-lint
21-
uses: golangci/golangci-lint-action@v2
21+
uses: golangci/golangci-lint-action@v3
2222
with:
23-
version: v1.39.0
23+
version: v1.52.2
2424
- name: Run linters
2525
run: |
2626
export PATH=$PATH:$(go env GOPATH)/bin
@@ -31,11 +31,11 @@ jobs:
3131
steps:
3232
- name: Install Go
3333
if: success()
34-
uses: actions/setup-go@v1
34+
uses: actions/setup-go@v4
3535
with:
36-
go-version: 1.16.x
36+
go-version: 1.20.x
3737
- name: Checkout code
38-
uses: actions/checkout@v2
38+
uses: actions/checkout@v3
3939
- name: Run tests
4040
run: make test
4141
- name: Convert coverage to lcov
@@ -54,11 +54,11 @@ jobs:
5454
needs: [lint, test]
5555
steps:
5656
- name: Install Go
57-
uses: actions/setup-go@v1
57+
uses: actions/setup-go@v4
5858
with:
59-
go-version: 1.16.x
59+
go-version: 1.20.x
6060
- name: Checkout code
61-
uses: actions/checkout@v2
61+
uses: actions/checkout@v3
6262
- name: build
6363
run: |
6464
export GO111MODULE=on

.github/workflows/upload_assets.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Install Go
12-
uses: actions/setup-go@v1
12+
uses: actions/setup-go@v4
1313
with:
14-
go-version: 1.13.x
14+
go-version: 1.20.x
1515
- name: Checkout code
16-
uses: actions/checkout@v1
16+
uses: actions/checkout@v3
1717
- name: build
1818
run: |
19-
export GO111MODULE=on
2019
make build
2120
for f in bin/*; do tar cvzf $f.tar.gz $f; rm $f; done
2221
cp README.md bin/

go.mod

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
module github.com/jandelgado/gcov2lcov
22

3-
go 1.12
3+
go 1.19
44

5-
require github.com/stretchr/testify v1.4.0
5+
require github.com/stretchr/testify v1.8.1
6+
7+
require (
8+
github.com/davecgh/go-spew v1.1.1 // indirect
9+
github.com/pmezard/go-difflib v1.0.0 // indirect
10+
gopkg.in/yaml.v3 v3.0.1 // indirect
11+
)

go.sum

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1-
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
21
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
2+
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
3+
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
34
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
45
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
56
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
6-
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
7-
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
7+
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
8+
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
9+
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
10+
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
11+
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
12+
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
13+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
814
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
9-
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
10-
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
15+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
16+
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
17+
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

main.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
// Credits:
77
// This tool is based on covfmt (https://github.com/ricallinson/covfmt) and
88
// uses some parts of goveralls (https://github.com/mattn/goveralls).
9-
//
109
package main
1110

1211
import (
@@ -166,9 +165,12 @@ func writeLcov(blocks map[string][]*block, f io.Writer) error {
166165
}
167166

168167
// Format being parsed is:
169-
// name.go:line.column,line.column numberOfStatements count
168+
//
169+
// name.go:line.column,line.column numberOfStatements count
170+
//
170171
// e.g.
171-
// github.com/jandelgado/golang-ci-template/main.go:6.14,8.2 1 1
172+
//
173+
// github.com/jandelgado/golang-ci-template/main.go:6.14,8.2 1 1
172174
func parseCoverageLine(line string) (string, *block, error) {
173175
path := strings.Split(line, ":")
174176
if len(path) != 2 {

pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/bin/sh
2-
golangci-lint -E bodyclose,misspell,gocyclo,dupl,gofmt,golint,unconvert,goimports,depguard,gocritic,funlen,interfacer run
2+
golangci-lint -E bodyclose,misspell,gocyclo,dupl,gofmt,unconvert,goimports,gocritic,funlen,errcheck,gosimple,govet,ineffassign,staticcheck,typecheck,unused run

0 commit comments

Comments
 (0)