mirror of
https://github.com/slackhq/nebula.git
synced 2025-11-22 08:24:25 +01:00
build with go1.20 (#854)
* build with go1.20 This has been out for a bit and is up to go1.20.4. We have been using go1.20 for the Slack builds and have seen no issues. * need the quotes * use go install
This commit is contained in:
15
.github/workflows/gofmt.yml
vendored
15
.github/workflows/gofmt.yml
vendored
@@ -14,10 +14,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Set up Go 1.19
|
||||
- name: Set up Go 1.20
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.19
|
||||
go-version: "1.20"
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
@@ -26,19 +26,18 @@ jobs:
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-gofmt1.19-${{ hashFiles('**/go.sum') }}
|
||||
key: ${{ runner.os }}-gofmt1.20-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gofmt1.19-
|
||||
${{ runner.os }}-gofmt1.20-
|
||||
|
||||
- name: Install goimports
|
||||
run: |
|
||||
go get golang.org/x/tools/cmd/goimports
|
||||
go build golang.org/x/tools/cmd/goimports
|
||||
go install golang.org/x/tools/cmd/goimports@latest
|
||||
|
||||
- name: gofmt
|
||||
run: |
|
||||
if [ "$(find . -iname '*.go' | grep -v '\.pb\.go$' | xargs ./goimports -l)" ]
|
||||
if [ "$(find . -iname '*.go' | grep -v '\.pb\.go$' | xargs goimports -l)" ]
|
||||
then
|
||||
find . -iname '*.go' | grep -v '\.pb\.go$' | xargs ./goimports -d
|
||||
find . -iname '*.go' | grep -v '\.pb\.go$' | xargs goimports -d
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user