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

Golic CI #372

Merged
merged 1 commit into from
Mar 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Golang lint and test
name: Golang lint, golic and test
on:
push:
paths-ignore:
Expand All @@ -17,5 +17,9 @@ jobs:
uses: golangci/golangci-lint-action@v2
with:
version: v1.32
- name: golic
run: |
go install github.com/AbsaOSS/[email protected]
golic inject -c "2021 Absa Group Limited" --dry -x
- name: go test
run: go test ./...
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ ifeq (, $(shell which golic))
GOLIC_TMP_DIR=$$(mktemp -d) ;\
cd $$GOLIC_TMP_DIR ;\
go mod init tmp ;\
go get github.com/AbsaOSS/golic@v0.3.1 ;\
go get github.com/AbsaOSS/golic@v0.4.4 ;\
rm -rf $$GOLIC_TMP_DIR ;\
}
GOLIC=$(GOBIN)/golic
Expand Down Expand Up @@ -292,7 +292,7 @@ start-test-app:

# run tests
.PHONY: test
test: license lint
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kuritka why did we remove local invocation?

Copy link
Collaborator Author

@kuritka kuritka Mar 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ytsarev I supposed you didn't want to check license during a test. Should I amend back ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kuritka yep, I meant to amend it with CI, not replace. So CI would catch the missing license in case the PR was created without running local tests

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ytsarev exactly

test: lint
$(call generate)
$(call manifest)
go test ./... -coverprofile cover.out
Expand Down