Skip to content

Commit

Permalink
ci: fmt and vet covered in golang Ci linters by default (OT-CONTAINER…
Browse files Browse the repository at this point in the history
…-KIT#792)

Signed-off-by: Shubham Gupta <[email protected]>
Signed-off-by: Matt Robinson <[email protected]>
  • Loading branch information
shubham-cmyk authored and mattrobinsonsre committed Jul 11, 2024
1 parent 89a35d6 commit 5731627
Showing 1 changed file with 2 additions and 33 deletions.
35 changes: 2 additions & 33 deletions .github/workflows/operator-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,6 @@ env:
DOCKERFILE_PATH: "**/Dockerfile"

jobs:
gofmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Check Go Fmt
run: |
gofmt_files=$(go fmt ./... | wc -l)
if [[ ${gofmt_files} > 0 ]]
then
echo "Please format golang files using:- go fmt ./..."
exit 1
else
echo "All files are formated using gofmt"
fi
govet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Run Go Vet
run: go vet ./...

gotest:
name: Go Test
runs-on: ubuntu-latest
Expand All @@ -65,8 +36,7 @@ jobs:
fail_ci_if_error: false
verbose: true

code_quality_golang_ci_lint:
needs: [gofmt, govet]
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -90,7 +60,6 @@ jobs:
version: v1.54.0

container_quality_dockerfile_lint:
needs: [gofmt, govet]
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -103,7 +72,7 @@ jobs:
ignore: DL3007,DL3018

build_go_binary:
needs: [code_quality_golang_ci_lint]
needs: [lint]
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down

0 comments on commit 5731627

Please sign in to comment.