Skip to content

Commit

Permalink
ci: use make fmt to check for formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Sunil Thaha <sthaha@redhat.com>
  • Loading branch information
sthaha committed Oct 19, 2023
1 parent b1e0cfe commit bf6d2a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 41 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/pr-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@ jobs:
make docs
git diff --exit-code
gofmt:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: actions/setup-go@main
with:
go-version-file: go.mod
- name: run gofmt test
run: ./automation/presubmit-tests/gofmt.sh
- name: Install all tools
uses: ./.github/tools-cache
- name: make fmt
run: make fmt && git diff --exit-code

escapes_detect:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -71,7 +73,7 @@ jobs:
run: make govulncheck

bundle:
needs: [docs, golangci, gofmt, vulnerability_detect, escapes_detect]
needs: [docs, golangci, fmt, vulnerability_detect, escapes_detect]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
Expand All @@ -87,7 +89,7 @@ jobs:
git diff --exit-code
build-images:
needs: [docs, golangci, gofmt, vulnerability_detect, escapes_detect]
needs: [docs, golangci, fmt, vulnerability_detect, escapes_detect]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -115,7 +117,7 @@ jobs:
additional_tags: ${{ steps.additional_tags.outputs.result }}

e2e:
needs: [docs, golangci, gofmt, vulnerability_detect, escapes_detect]
needs: [docs, golangci, fmt, vulnerability_detect, escapes_detect]
env:
KIND_VERSION: "0.15.0"
GO111MODULE: "on"
Expand Down
35 changes: 0 additions & 35 deletions automation/presubmit-tests/gofmt.sh

This file was deleted.

0 comments on commit bf6d2a3

Please sign in to comment.