Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Commit

Permalink
Upgrade to setup-go v5 (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
nacx authored Feb 12, 2024
1 parent fbb3218 commit 4b8807c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 67 deletions.
75 changes: 12 additions & 63 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,98 +12,55 @@ on:

env:
GOPROXY: https://proxy.golang.org
GOVERSION: 1.21.6

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GOVERSION }}
- uses: actions/checkout@v4
- uses: actions/cache@v4
- uses: actions/setup-go@v5
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
go-version-file: go.mod
- run: make check

build:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GOVERSION }}
- uses: actions/checkout@v4
- uses: actions/cache@v4
- uses: actions/setup-go@v5
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
go-version-file: go.mod
- run: make build

test:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GOVERSION }}
- uses: actions/checkout@v4
- uses: actions/cache@v4
- uses: actions/setup-go@v5
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
go-version-file: go.mod
- run: make test

lint:
needs: check
runs-on: ubuntu-latest
env:
LINT_OPTS: "--timeout 10m"
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GOVERSION }}
- uses: actions/checkout@v4
- uses: actions/cache@v4
- uses: actions/setup-go@v5
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
go-version-file: go.mod
- run: make lint

coverage:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GOVERSION }}
- uses: actions/checkout@v4
- uses: actions/cache@v4
- uses: actions/setup-go@v5
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
go-version-file: go.mod
- run: make coverage
- uses: codecov/codecov-action@v3
with:
Expand All @@ -117,16 +74,8 @@ jobs:
with:
platforms: amd64,arm64
- uses: docker/setup-buildx-action@v2
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GOVERSION }}
- uses: actions/checkout@v4
- uses: actions/cache@v4
- uses: actions/setup-go@v5
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
go-version-file: go.mod
- run: make docker e2e
7 changes: 3 additions & 4 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:

env:
GOPROXY: https://proxy.golang.org
GOVERSION: 1.21.6

jobs:
publish:
Expand All @@ -20,10 +19,10 @@ jobs:
# Set the RELEASE_TAG to force the version of the Docker images
echo "DOCKER_TAG=${GITHUB_REF_NAME}" >> "$GITHUB_ENV"
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GOVERSION }}
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_INTERNAL_CONTAINERS_SERVICE_ACCOUNT_KEY }}
Expand Down

0 comments on commit 4b8807c

Please sign in to comment.