Skip to content

Commit

Permalink
chore: add code coverage workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyasbhat0 committed Jan 17, 2024
1 parent 8ee8b41 commit 222dad2
Show file tree
Hide file tree
Showing 6 changed files with 427 additions and 361 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Code Coverage with Codecov

on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
Coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.21.4"

- name: GO test
run: |
go list -f '{{.Dir}}/...' -m | xargs go test -short -timeout=3m -covermode=atomic -coverprofile=coverage.out
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ logs/
output/

node_modules/

*.out
17 changes: 9 additions & 8 deletions cli/go.mod
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
module github.com/hugobyte/dive-core/cli

go 1.21
go 1.21.4

require (
github.com/briandowns/spinner v1.23.0
github.com/fatih/color v1.16.0
github.com/google/go-github v17.0.0+incompatible
github.com/kurtosis-tech/kurtosis/api/golang v0.86.4
github.com/kurtosis-tech/kurtosis/api/golang v0.86.6
github.com/kurtosis-tech/stacktrace v0.0.0-20211028211901-1c67a77b5409
github.com/natefinch/lumberjack v2.0.0+incompatible
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.0
)

require (
github.com/google/go-cmp v0.6.0 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/kurtosis-tech/kurtosis/utils v0.0.0-20240110191550-e9142c271498 // indirect
github.com/kurtosis-tech/kurtosis/utils v0.0.0-20240116202251-69c57ec4384a // indirect
github.com/mholt/archiver v3.1.1+incompatible // indirect
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
)
Expand All @@ -26,7 +27,7 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/google/uuid v1.5.0 // indirect
github.com/kurtosis-tech/kurtosis/contexts-config-store v0.0.0-20240110191550-e9142c271498 // indirect
github.com/kurtosis-tech/kurtosis/contexts-config-store v0.0.0-20240116202251-69c57ec4384a // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.5.1 // indirect
github.com/stretchr/testify v1.8.4
Expand All @@ -43,7 +44,7 @@ require (
github.com/google/go-querystring v1.1.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/kurtosis-tech/kurtosis-portal/api/golang v0.0.0-20231031173452-349f1ec9a443 // indirect
github.com/kurtosis-tech/kurtosis/grpc-file-transfer/golang v0.0.0-20240110191550-e9142c271498 // indirect
github.com/kurtosis-tech/kurtosis/grpc-file-transfer/golang v0.0.0-20240116202251-69c57ec4384a // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/nwaples/rardecode v1.1.3 // indirect
Expand All @@ -56,9 +57,9 @@ require (
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto v0.0.0-20240108191215-35c7eff3a6b1 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240108191215-35c7eff3a6b1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect
google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240116215550-a9fa1716bcac // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac // indirect
google.golang.org/grpc v1.60.1 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
Expand Down
3 changes: 1 addition & 2 deletions go.work
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
go 1.21.0
go 1.21.4

use (
./cli
./test/functional

)
Loading

0 comments on commit 222dad2

Please sign in to comment.