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

github/workflows: migrate CI to Go 1.19 and fix linting issues #2426

Merged
merged 19 commits into from
Nov 14, 2022
Merged
Show file tree
Hide file tree
Changes from 14 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
4 changes: 2 additions & 2 deletions .github/workflows/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17.0
go-version: 1.19.x
- name: Set up Node
uses: actions/setup-node@v3
with:
Expand All @@ -36,6 +36,6 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17.0
go-version: 1.19.x
- name: lint
run: make api-lint
21 changes: 12 additions & 9 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,23 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
id: setup-go
with:
go-version: 1.17.0
go-version: 1.19.x
- name: go mod cache
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-${{ steps.setup-go.outputs.go-version }}-go-mod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-mod-
- name: go build cache
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-${{ steps.setup-go.outputs.go-version }}-go-build-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-build-
- run: make backend
Expand All @@ -41,22 +42,23 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
id: setup-go
with:
go-version: 1.17.0
go-version: 1.19.x
- name: go mod cache
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-${{ steps.setup-go.outputs.go-version }}-go-mod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-mod-
- name: go test cache
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
key: ${{ runner.os }}-go-test-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-${{ steps.setup-go.outputs.go-version }}-go-test-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-test-
- run: make backend-test
Expand All @@ -73,14 +75,15 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
id: setup-go
with:
go-version: 1.17.0
go-version: 1.19.x
- name: go mod cache
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-${{ steps.setup-go.outputs.go-version }}-go-mod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-mod-
- name: go lint cache
Expand All @@ -89,7 +92,7 @@ jobs:
path: |
~/.cache/go-build
~/.cache/golangci-lint
key: ${{ runner.os }}-go-lint-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-${{ steps.setup-go.outputs.go-version }}-go-lint-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-lint-
- run: make backend-lint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
VERSION=latest
TAGS="${DOCKER_IMAGE}:${VERSION}"
TAGS="$TAGS,${DOCKER_IMAGE}:sha-${GITHUB_SHA::7}"
echo ::set-output name=tags::${TAGS}
echo "tags=${TAGS}" >>${GITHUB_OUTPUT}
- name: build and push
if: github.ref == 'refs/heads/main'
uses: docker/[email protected]
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
id: setup-go
with:
go-version: 1.17.0
go-version: 1.19.x
- uses: actions/setup-node@v3
with:
node-version: '16.x'
Expand All @@ -108,15 +109,15 @@ jobs:
with:
path: |
~/go/pkg/mod
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-${{ steps.setup-go.outputs.go-version }}-go-mod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-mod-
- name: go build cache
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
key: ${{ runner.os }}-go-mock-build-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-${{ steps.setup-go.outputs.go-version }}-go-mock-build-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-mock-build-
${{ runner.os }}-go-build-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scaffolding.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
path: ${{ env.PACKAGEPATH }}
- uses: actions/setup-go@v3
with:
go-version: 1.17.0
go-version: 1.19.x
- uses: actions/setup-node@v3
with:
node-version: '16.x'
Expand Down
4 changes: 0 additions & 4 deletions backend/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,18 @@
linters:
disable-all: true
enable:
- deadcode
- errcheck
- exportloopref
- gci
- gocritic
- gofmt
- goimports
- gosec
- gosimple
- govet
- ineffassign
- staticcheck
- structcheck
- typecheck
- unused
- varcheck
- whitespace
linters-settings:
gocritic:
Expand Down
2 changes: 2 additions & 0 deletions backend/api/audit/v1/audit.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/api/authn/v1/authn.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/api/chaos/experimentation/v1/properties.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions backend/api/config/gateway/v1/gateway.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions backend/api/config/service/audit/v1/audit.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 12 additions & 13 deletions backend/api/config/service/auditsink/slack/v1/slack.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/api/config/service/authn/v1/authn.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/api/config/service/authz/v1/authz.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/api/config/service/db/postgres/v1/database.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading