Skip to content

Commit

Permalink
Merge pull request #9 from slintes/prepare_openshift_ci
Browse files Browse the repository at this point in the history
Cleanup and prepare Openshift CI
  • Loading branch information
slintes authored Jul 26, 2023
2 parents 3cb76c1 + 66bd6ab commit 8b4dbe4
Show file tree
Hide file tree
Showing 3,773 changed files with 25 additions and 1,372,691 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 4 additions & 0 deletions .ci-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build_root_image:
namespace: openshift
name: release
tag: rhel-8-release-golang-1.20-openshift-4.14
12 changes: 6 additions & 6 deletions .github/workflows/pre-submit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs: # jobs to run
with:
fetch-depth: 0

- name: Verify imports are sorted
run: make test-imports
- name: Build
run: make build

- name: Verify there are no packages to vendor
run: make verify-vendor
- name: Run all linters etc.
run: make lint

- name: Run checks and unit tests
run: make check
- name: Run unit tests
run: make test
30 changes: 15 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,24 @@ rm -rf $$TMP_DIR ;\
}
endef

.PHONY: build
build: ## Build.
go build ./...

.PHONY: test
test: ## Run tests.
test: ## Run unit tests.
go test ./... -coverprofile cover.out -v

.PHONY: lint
lint: tidy goimports fix-imports vet verify-no-changes ## Run linters etc.

.PHONY: check
check: fmt vet goimports verify-no-changes ## Dockerized version of make test with additional verifications
$(DOCKER_GO) "make test"
check: ## Dockerized version of make test with additional verifications
$(DOCKER_GO) "make lint test"

.PHONY: fmt
fmt: ## Run go fmt against code.
go fmt ./...
.PHONY: goimports
goimports: install-goimports ## Run go fmt against code.
$(GOIMPORTS) -w ./pkg

.PHONY: vet
vet: ## Run go vet against code.
Expand All @@ -49,17 +56,10 @@ vet: ## Run go vet against code.
verify-no-changes: ## verify there are no un-staged changes
./hack/verify-diff.sh

.PHONY:vendor
vendor: ## Runs go mod vendor
go mod vendor

.PHONY: tidy
tidy: ## Runs go mod tidy
go mod tidy

.PHONY:verify-vendor
verify-vendor:tidy vendor verify-no-changes ##Verifies vendor and tidy didn't cause changes

SORT_IMPORTS = $(shell pwd)/bin/sort-imports
.PHONY: sort-imports
sort-imports: ## Download sort-imports locally if necessary.
Expand All @@ -74,6 +74,6 @@ fix-imports: sort-imports ## Sort imports
$(SORT_IMPORTS) . -w

GOIMPORTS = $(shell pwd)/bin/goimports
goimports: ## updates goimports.
.PHONY: install-goimports
install-goimports: ## updates goimports.
$(call go-install-tool,$(GOIMPORTS),golang.org/x/tools/cmd/goimports@$(GOIMPORTS_VERSION))
$(GOIMPORTS) -w ./pkg
20 changes: 0 additions & 20 deletions vendor/github.com/beorn7/perks/LICENSE

This file was deleted.

Loading

0 comments on commit 8b4dbe4

Please sign in to comment.