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

[YUNIKORN-2098] Change go lint SHA detection (following) #715

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
8 changes: 6 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ jobs:
- name: Checkout source code
uses: actions/checkout@v3
with:
fetch-depth: 2
fetch-depth: 0
- name: Fetch all branches and tags
run: git fetch --all
- name: Set up Go
uses: actions/setup-go@v3
with:
Expand Down Expand Up @@ -45,7 +47,9 @@ jobs:
- name: Checkout source code
uses: actions/checkout@v3
with:
fetch-depth: 2
fetch-depth: 0
- name: Fetch all branches and tags
run: git fetch --all
Comment on lines +50 to +52
Copy link
Contributor

Choose a reason for hiding this comment

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

Do not think this is needed, the fetch-depth or any history to build for the e2e tests only.

- name: Set up Go
uses: actions/setup-go@v3
with:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ jobs:
- name: Checkout source code
uses: actions/checkout@v3
with:
fetch-depth: 2
fetch-depth: 0
- name: Fetch all branches and tags
run: git fetch --all
Comment on lines +15 to +17
Copy link
Contributor

Choose a reason for hiding this comment

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

Do not think this is needed, the fetch-depth is a left over of the old pre-split flow and we should not need it here for the code coverage we run.

- name: Set up Go
uses: actions/setup-go@v3
with:
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,9 @@ $(SPARK_SUBMIT_CMD):
.PHONY: lint
lint: $(GOLANGCI_LINT_BIN)
@echo "running golangci-lint"
@git symbolic-ref -q HEAD && REV="origin/HEAD" || REV="HEAD^" ; \
@git show-ref
@REV="origin/HEAD"; \
git rev-parse $${REV} || REV="HEAD^"; \
headSHA=$$(git rev-parse --short=12 $${REV}) ; \
echo "checking against commit sha $${headSHA}" ; \
"${GOLANGCI_LINT_BIN}" run --new-from-rev=$${headSHA}
Expand Down