Skip to content

Commit

Permalink
add codev
Browse files Browse the repository at this point in the history
  • Loading branch information
satoshi-099 committed Oct 20, 2023
1 parent b05eec9 commit 8106419
Show file tree
Hide file tree
Showing 3 changed files with 401 additions and 24 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/rotom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,6 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '^1.20'

- name: Checkout repository
uses: actions/checkout@v4

- name: Setup golangci-lint
uses: golangci/golangci-lint-action@v3.7.0
with:
version: v1.52.2
args: --verbose --timeout=5m

- name: Get dependencies
run: go mod download

- name: Run tests with coverage
run: go test ./... -coverprofile=coverage.out

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ run-gc:
GODEBUG=gctrace=1 go run main.go

test-cover:
go test -coverprofile=c.out
go tool cover -html=c.out -o coverage.html
rm c.out
go test -coverprofile=coverage.out
go tool cover -html=coverage.out -o coverage.html
rm *.db

test-cover-structx:
cd structx && bash -c "go test -coverprofile=c.out && go tool cover -html=c.out -o coverage.html && rm c.out"
cd structx && bash -c "
go test -coverprofile=coverage.out
&& go tool cover -html=coverage.out -o coverage.html
"

pprof:
go tool pprof -http=:18081 "http://localhost:6060/debug/pprof/profile?seconds=60"
Expand Down
Loading

0 comments on commit 8106419

Please sign in to comment.