-
Notifications
You must be signed in to change notification settings - Fork 249
[CICD] Move gofumpt check to CICD, add cache #1518
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
Changes from 2 commits
7b8fee5
c67b60d
59a11ce
06a81da
0d2825d
96c27bb
3440ec1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,12 +64,23 @@ jobs: | |
- uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: ./go.mod | ||
- run: go run ./cmd/devbox run fmt | ||
- name: golangci-lint | ||
uses: golangci/[email protected] | ||
|
||
- name: Install devbox | ||
uses: jetpack-io/[email protected] | ||
with: | ||
enable-cache: true | ||
|
||
- name: Mount golang cache | ||
uses: actions/cache@v3 | ||
with: | ||
args: "--out-${NO_FUTURE}format colored-line-number --timeout=10m" | ||
skip-cache: true | ||
path: | | ||
~/.cache/golangci-lint | ||
~/.cache/go-build | ||
~/go/pkg | ||
key: ${{ runner.os }}-${{ hashFiles('go.work.sum') }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion:
This may make it faster in the event of a cache miss, since it'll use the pre-existing "closest" cache as a starting point and then download the handful of changed dependencies to update the cache. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agree with using restore keys, but not with adding |
||
|
||
- run: devbox run fmt && git diff --exit-code | ||
- run: devbox run lint | ||
|
||
test: | ||
strategy: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
run: | ||
go: "1.20" | ||
go: "1.21" | ||
linters: | ||
disable-all: true | ||
enable: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go.sum
? We don't have a go-workspace in devbox.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch. My copy paste bad.