-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add Go 1.19 Support #1355
Merged
Merged
Add Go 1.19 Support #1355
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
afb45d1
Update Go Version to Go1.19.x And add cache
Aoang 655640c
Fix CI Line endings
Aoang 4886250
Update test CI Go Version to Go1.19.x And add cache
Aoang 90b50f2
Update Gosec Security Scanner CI to securego/[email protected]
Aoang a55b952
Format comment
Aoang 09146cd
Fix doc structure
Aoang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,14 +9,40 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18.x | ||
go-version: 1.19.x | ||
|
||
- name: Get Go cache paths | ||
id: go-env | ||
run: | | ||
echo "::set-output name=cache::$(go env GOCACHE)" | ||
echo "::set-output name=modcache::$(go env GOMODCACHE)" | ||
- name: Set up Go cache | ||
uses: actions/cache@v3 | ||
with: | ||
key: golangci-lint-${{ runner.os }}-go-${{ hashFiles('go.mod') }} | ||
restore-keys: golangci-lint-${{ runner.os }}-go- | ||
path: | | ||
${{ steps.go-env.outputs.cache }} | ||
${{ steps.go-env.outputs.modcache }} | ||
|
||
- name: Install golangci-lint | ||
run: go install github.com/golangci/golangci-lint/cmd/[email protected] | ||
|
||
- name: Get golangci-lint cache path | ||
id: golangci-lint-cache-status | ||
run: | | ||
echo "::set-output name=dir::$(golangci-lint cache status | head -1 | sed 's/^Dir: //')" | ||
|
||
- name: Set up golangci-lint cache | ||
uses: actions/cache@v3 | ||
with: | ||
key: golangci-lint-${{ runner.os }}-golangci-lint-${{ hashFiles('go.mod') }} | ||
restore-keys: golangci-lint-${{ runner.os }}-golangci-lint- | ||
path: ${{ steps.golangci-lint-cache-status.outputs.dir }} | ||
|
||
- run: go version | ||
- run: diff -u <(echo -n) <(gofmt -d .) | ||
- name: Run golangci-lint | ||
run: | # https://github.com/golangci/golangci-lint/pull/2438 | ||
export PATH=$PATH:$(go env GOPATH)/bin | ||
go install github.com/golangci/golangci-lint/cmd/[email protected] | ||
golangci-lint run | ||
|
||
run: golangci-lint run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,20 +8,14 @@ jobs: | |
test: | ||
strategy: | ||
matrix: | ||
go-version: [1.18.x] | ||
go-version: [1.19.x] | ||
platform: [ubuntu-latest] | ||
runs-on: ${{ matrix.platform }} | ||
env: | ||
GO111MODULE: on | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- uses: actions/checkout@v2 | ||
- name: Run Gosec Security Scanner | ||
run: | # https://github.com/securego/gosec/issues/469#issuecomment-1070608395 | ||
export PATH=$PATH:$(go env GOPATH)/bin | ||
go install github.com/securego/gosec/v2/cmd/gosec@latest | ||
gosec -exclude=G104,G304,G402 ./... | ||
uses: securego/[email protected] | ||
with: | ||
args: '-exclude=G104,G304,G402 ./...' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@Aoang curious why you ended up doing this? In wazero, we're noticing the cache doesn't seem to work for golangci-lint and wondering if there's some difference between this and hard-coding (considering it is only run with ubuntu). Any thoughts appreciated!
https://github.com/tetratelabs/wazero/blob/main/.github/workflows/commit.yaml#L46-L52
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.
continue tetratelabs/wazero#804