Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new make targets in CI #663

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
43 changes: 30 additions & 13 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,44 @@ jobs:
run: |
go test ./... -race

fmt_and_vet:
name: "fmt and lint"
copyright:
name: "copyright headers"
runs-on: ubuntu-latest
steps:
- name: "Fetch source code"
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: go.mod
- name: "copyright headers check"
run: |
make copyrightcheck

govet:
name: "go vet"
runs-on: ubuntu-latest
steps:
- name: "Fetch source code"
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: go.mod
- name: "Check vet"
- name: "go vet"
run: |
go vet ./...
- name: "Check fmt"
make vetcheck

gofmt:
name: "gofmt"
runs-on: ubuntu-latest
steps:
- name: "Fetch source code"
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: go.mod
- name: "gofmt"
run: |
go fmt ./...
if [[ -z "$(git status --porcelain)" ]]; then
echo "Formatting is consistent with 'go fmt'."
else
echo "Run 'go fmt ./...' to automatically apply standard Go style to all packages."
git status --porcelain
exit 1
fi
make fmtcheck