Skip to content

Commit

Permalink
Merge pull request #380 from acald-creator/upgrade/1.19
Browse files Browse the repository at this point in the history
Upgrade/1.19
  • Loading branch information
leecalcote authored Oct 7, 2022
2 parents e604492 + ce4b686 commit 1c32c8b
Show file tree
Hide file tree
Showing 12 changed files with 400 additions and 1,227 deletions.
33 changes: 22 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@ jobs:
golangci-lint:
strategy:
matrix:
go-version: [1.17.x]
go-version: [1.19.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/setup-go@v3
- uses: actions/setup-go@master
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@master
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.29
version: v1.49

# Optional: golangci-lint command line arguments.
# args: --skip-dirs-use-default=true
Expand All @@ -36,16 +38,16 @@ jobs:
build:
strategy:
matrix:
go-version: [1.17.x]
go-version: [1.19.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@master
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@master
- name: Cache go modules
uses: actions/cache@v3
with:
Expand All @@ -60,16 +62,16 @@ jobs:
test:
strategy:
matrix:
go-version: [1.17.x]
go-version: [1.19.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@master
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@master
- name: Cache go modules
uses: actions/cache@v3
with:
Expand All @@ -86,13 +88,22 @@ jobs:
make test
docker-test:
name: Docker build
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.19.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@master
with:
go-version: ${{ matrix.go-version }}
- name: Check out code
uses: actions/checkout@master
with:
fetch-depth: 1
- name: Docker edge build & tag
if: startsWith(github.ref, 'refs/tags/') != true && success()
run: |
go mod tidy
make docker-build
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-operator'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@master
# token here with write access to meshery-operator repo
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}
ref: 'master'

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

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

# to push changes to meshery docs
- name: Checkout meshery
uses: actions/checkout@v3
uses: actions/checkout@master
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@v3
- uses: actions/checkout@master
with:
ref: master # Set your default branch

Expand Down
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ linters:
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
disable-all: true
enable:
- deadcode
# - deadcode
- dogsled
- errcheck
- gocritic
- gofmt
- golint
# - golint
# todo[kusthedude]: restore gosec check, once this issue is resolved https://github.com/golangci/golangci-lint/issues/177
# - gosec
- govet
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.17 as builder
FROM golang:1.19 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand All @@ -16,7 +16,7 @@ COPY controllers/ controllers/
COPY pkg/ pkg/

# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
RUN CGO_ENABLED=0 GO111MODULE=on go build -a -o manager main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down
Loading

0 comments on commit 1c32c8b

Please sign in to comment.