Skip to content

Commit

Permalink
Merge pull request openshift#84 from clnperez/more-ci-checks
Browse files Browse the repository at this point in the history
additional ci checks and test fixes
  • Loading branch information
clnperez authored Dec 1, 2021
2 parents 4fd7e76 + bb018c6 commit b23b106
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 7 deletions.
41 changes: 35 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,43 @@ jobs:
go version
go install golang.org/x/lint/golint
- name: Run go fmt & lint
- name: Run go fmt
run: |
go fmt -mod=readonly ./...
git diff HEAD
if [ `git diff HEAD --name-only | wc -l` -gt 0 ]; then exit 1; fi
golint -set_exit_status=1 `go list -mod=readonly ./... | grep -v /vendor/`
unformatted=$(IS_CONTAINER=FALSE ./hack/go-fmt.sh .)
if [[ ! -z "${unformatted}" ]]; then
echo "fix the gofmt issues"
echo "${unformatted}"
exit 1
fi
##TODO: Enable verify-vendor.sh script before upstream code.
#IS_CONTAINER=FALSE bash ./hack/verify-vendor.sh
- name: Build
- name: Run go lint
run: |
lint=$(IS_CONTAINER=FALSE ./hack/go-lint.sh -min_confidence 0.3 $(go list -f '{{.ImportPath }}' ./...))
if [[ ! -z "$(lint)" ]]; then
echo "fix lint issues"
echo "${lint}"
exit 1
fi
- name: Verify codegen
run: |
IS_CONTAINER=FALSE bash ./hack/verify-codegen.sh
- name: Run go vet
run: |
go mod vendor
IS_CONTAINER=FALSE ./hack/go-vet.sh ./...
if [[ $? -ne 0 ]]; then
echo "fix go vet"
exit 1
fi
- name: Build verification
run: |
./hack/build.sh
- name: Test
run: |
go test ./pkg/...
3 changes: 3 additions & 0 deletions pkg/explain/printer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ func Test_PrintFields(t *testing.T) {
ovirt <object>
Ovirt is the configuration used when installing on oVirt.
powervs <object>
PowerVS is the configuration used when installing on Power VS.
vsphere <object>
VSphere is the configuration used when installing on vSphere.`,
}, {
Expand Down
1 change: 0 additions & 1 deletion pkg/types/installconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ var (
baremetal.Name,
ibmcloud.Name,
none.Name,
powervs.Name,
}

// OKD is a setting to enable community-only modifications
Expand Down

0 comments on commit b23b106

Please sign in to comment.