Skip to content

Commit

Permalink
add deadcode detection (#38)
Browse files Browse the repository at this point in the history
* add deadcode detection

* enable caching
  • Loading branch information
rajatgoel authored Jan 20, 2024
1 parent 3333832 commit 3e97a01
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ jobs:
fail-fast: true

steps:
- name: Check out code
- name: Checkout Code
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true

- name: Go Format
run: gofmt -w . && git diff --exit-code
Expand Down Expand Up @@ -51,14 +52,14 @@ jobs:
- name: Go Build
run: go build -o /dev/null ./...

- name: Go Compile Tests
run: go test -exec /bin/true ./...

- name: Go Test
run: go test -v -count=1 -race -shuffle=on ./...

- name: Go Benchmark
run: go test -v -shuffle=on -run=- -bench=. -benchtime=1x ./...

- name: Go Vuln Check
run: go install golang.org/x/vuln/cmd/govulncheck@latest && govulncheck -test ./...
run: go install golang.org/x/vuln/cmd/govulncheck@latest && govulncheck -test ./...

- name: Go Deadcode
run: go install golang.org/x/tools/cmd/deadcode@latest && deadcode ./...

0 comments on commit 3e97a01

Please sign in to comment.