Skip to content

Commit

Permalink
actions: remove redundant gofmt and govet calls
Browse files Browse the repository at this point in the history
gofmt and govet are not handled by golangci-lint, which runs in a
separate actions workflow. No need to run them here as well.
  • Loading branch information
willnorris committed Aug 19, 2021
1 parent 02c7be3 commit 139c9e7
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/tests.yml
Expand Up @@ -21,7 +21,7 @@ jobs:
# is very little in the library that is platform specific
- go-version: 1.x
platform: windows-latest

# only update test coverage stats with the most recent go version on linux
- go-version: 1.x
platform: ubuntu-latest
Expand All @@ -38,13 +38,13 @@ jobs:
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v2

# Get values for cache paths to be used in later steps
- id: cache-paths
run: |
echo "::set-output name=go-cache::$(go env GOCACHE)"
echo "::set-output name=go-mod-cache::$(go env GOMODCACHE)"
- name: Cache go modules
uses: actions/cache@v2
with:
Expand All @@ -54,17 +54,10 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-

- name: Run go fmt
if: runner.os != 'Windows'
run: diff -u <(echo -n) <(gofmt -d -s .)

This comment has been minimized.

Copy link
@gmlewis

gmlewis Apr 11, 2022

Collaborator

@willnorris - I think we still need this, as no errors were flagged on this PR:
#2333
even though it obviously had gofmt problems.

This comment has been minimized.

Copy link
@willnorris

willnorris Apr 28, 2022

Author Collaborator

sorry... seeing this late. Interesting. I also realize I had a typo in the commit message... s/not/now/. I'm not sure why golangci-lint didn't catch this :-. (Unless you've already figured this out in the two weeks since you posted this 😄 )

This comment has been minimized.

Copy link
@gmlewis

gmlewis Apr 28, 2022

Collaborator

No problem! Sorry, no I have not dug deeper into this one. 😄


- name: Ensure go generate produces a zero diff
shell: bash
run: go generate -x ./... && git diff --exit-code; code=$?; git checkout -- .; (exit $code)

- name: Run go vet
run: go vet ./...

- name: Run go test
run: go test -v -race -coverprofile coverage.txt -covermode atomic ./...

Expand Down

0 comments on commit 139c9e7

Please sign in to comment.