Skip to content

Commit

Permalink
Merge pull request #490 from acald-creator/upgrade/go/v1.19
Browse files Browse the repository at this point in the history
Upgrade to Go 1.19
  • Loading branch information
leecalcote authored Sep 29, 2022
2 parents e30c33c + f63b7f6 commit 7ecbb21
Show file tree
Hide file tree
Showing 20 changed files with 320 additions and 919 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Meshery Adapter for Istio Build and Releaser
name: Meshery-Istio Build and Release
on:
push:
branches:
Expand All @@ -13,20 +13,20 @@ jobs:
# needs: [lint, error_check, static_check, vet, sec_check, tests]
steps:
- name: Check out code
uses: actions/checkout@master
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.19
- run: GOPROXY=direct GOSUMDB=off GO111MODULE=on go build .
docker:
name: Docker build and push
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@master
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Docker login
Expand Down
72 changes: 42 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Meshery Istio
name: Default Meshery Istio Workflow
on:
push:
branches:
Expand All @@ -12,44 +12,53 @@ on:
branches:
- master
jobs:
lint:
name: Check & Review code
golangci:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@master
- uses: actions/setup-go@v3
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v2
go-version: 1.19
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
go-version: 1.17
- run: GOPROXY=https://proxy.golang.org,direct GOSUMDB=off go get -u golang.org/x/lint/golint; go list ./istio/... | grep -v /vendor/ | xargs -L1 /home/runner/go/bin/golint -set_exit_status
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.49

# Optional: working directory, useful for monorepos
# working-directory: somedir

# Optional: golangci-lint command line arguments.
# args: --issues-exit-code=0

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
error_check:
name: Error check
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@master
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.17
- run: GOPROXY=https://proxy.golang.org,direct GOSUMDB=off GO111MODULE=on go get -u github.com/kisielk/errcheck; /home/runner/go/bin/errcheck -tags draft ./...
go-version: 1.19
- run: GOPROXY=https://proxy.golang.org,direct GOSUMDB=off GO111MODULE=on go install github.com/kisielk/errcheck@latest; /home/runner/go/bin/errcheck -tags draft ./...
error_code_check:
name: Error code utility check
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@master
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.19
- run: |
errWillHave="level=error"
GOPROXY=https://proxy.golang.org,direct GOSUMDB=off GO111MODULE=on go install github.com/layer5io/meshkit/cmd/errorutil;
Expand All @@ -66,26 +75,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@master
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: dominikh/[email protected]
with:
go-version: 1.17
- run: GOPROXY=https://proxy.golang.org,direct GOSUMDB=off GO111MODULE=on go get -u honnef.co/go/tools/cmd/staticcheck; /home/runner/go/bin/staticcheck -tags draft -checks all ./istio/... # https://staticcheck.io/docs/checks
install-go: false
version: "2022.1"
vet:
name: Vet
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@master
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.19
- run: GOPROXY=https://proxy.golang.org,direct GOSUMDB=off GO111MODULE=on go vet -tags draft ./...
sec_check:
name: Security check
Expand All @@ -94,7 +106,7 @@ jobs:
GO111MODULE: on
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Run Gosec Security Scanner
Expand All @@ -109,17 +121,17 @@ jobs:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- name: Check out code
uses: actions/checkout@master
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.19
- name: Create cluster using KinD
uses: engineerd/setup-kind@v0.3.0
uses: engineerd/setup-kind@v0.5.0
with:
version: "v0.7.0"
version: "v0.11.0"
- run: |
export CURRENTCONTEXT="$(kubectl config current-context)"
echo "current-context:" ${CURRENTCONTEXT}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/component-generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@master
uses: actions/checkout@v3
with:
fetch-depth: 1
token: ${{ secrets.GH_ACCESS_TOKEN }}
ref: "master"
- name: Setup Go
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.19
- name: Run adapter to create components
run: |
touch log.txt
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/e2etests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test Istio Adapter - control plane
name: E2E Test Istio Adapter - Control Plane

on:
push:
Expand All @@ -21,7 +21,7 @@ jobs:
adapter_version: ${{ env.version }}
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Get version of adapter
run: |
if [ ${{ github.event_name }} == "release" ];then
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
if [ "${{github.event_name }}" == "release" ];then
echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
fi
- uses: actions/checkout@master
- uses: actions/checkout@v3
with:
repository: meshery/meshery
token: ${{ secrets.GH_ACCESS_TOKEN }}
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
adapter_version: ${{ env.version }}
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Get version of adapter
run: |
if [ ${{ github.event_name }} == "release" ];then
Expand Down Expand Up @@ -193,7 +193,7 @@ jobs:
if [ "${{github.event_name }}" == "release" ];then
echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
fi
- uses: actions/checkout@master
- uses: actions/checkout@v3
with:
repository: meshery/meshery
token: ${{ secrets.GH_ACCESS_TOKEN }}
Expand Down Expand Up @@ -251,7 +251,7 @@ jobs:
adapter_version: ${{ env.version }}
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Get version of adapter
run: |
if [ ${{ github.event_name }} == "release" ];then
Expand Down Expand Up @@ -308,7 +308,7 @@ jobs:
if [ "${{github.event_name }}" == "release" ];then
echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
fi
- uses: actions/checkout@master
- uses: actions/checkout@v3
with:
repository: meshery/meshery
token: ${{ secrets.GH_ACCESS_TOKEN }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/error-ref-publisher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ jobs:
if: github.repository == 'meshery/meshery-istio'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# token here with write access to meshery-istio repo
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}
ref: 'master'

- name: Setup Go
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.19

- name: Run utility
run: |
Expand All @@ -39,7 +39,7 @@ jobs:

# to push changes to meshery docs
- name: Checkout meshery
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: 'meshery/meshery'
# token with write access to meshery repository
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/label-commenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ permissions:

jobs:
comment:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: master # Set your default branch

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/slack.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Slack Notify
name: Slack Notify on Star
on:
watch:
issues:
Expand Down
Loading

0 comments on commit 7ecbb21

Please sign in to comment.