Skip to content

Commit

Permalink
ci: bump to use go1.21 for build
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
chenrui333 committed Jan 10, 2024
1 parent 54a3a9a commit d78aaaf
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 22 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,23 @@ on:
- "go.sum"
- ".github/workflows/code.yml"

env:
GO_VERSION: "1.20.4"

jobs:

lint:
name: Code Lint
runs-on: ubuntu-latest
steps:
- name: Setup Go Environment
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Checkout Source Code
uses: actions/checkout@v4
# https://github.com/reviewdog/reviewdog/issues/1158
# Permissions need to match container user

- name: Setup Go Environment
uses: actions/setup-go@v5
with:
go-version-file: go.mod
id: go

- name: "Give Permissions"
run: |
sudo chown -R root $GITHUB_WORKSPACE
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
tags:
- 'v*'
env:
GO_VERSION: "1.20.4"

jobs:
goreleaser:
Expand All @@ -15,10 +13,12 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Go Environment
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: go.mod

- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ on:
- "**/*.go"
- ".github/workflows/schema.yaml"

env:
GO_VERSION: "1.20.4"

jobs:
schema:
name: JSON Schema
Expand All @@ -24,7 +21,7 @@ jobs:
- name: Setup Go Environment
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: go.mod

- name: Build EaseProbe
run: make
Expand All @@ -38,4 +35,4 @@ jobs:
message: "Update JSON Schema"
add: "resources/schema.json"
author_name: "GitHub Actions"
author_email: "[email protected]"
author_email: "[email protected]"
11 changes: 5 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ on:
- ".github/workflows/test.yaml"


env:
GO_VERSION: "1.20.4"

jobs:
test:
name: Unit Testing
Expand All @@ -33,13 +30,15 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout Source Code
uses: actions/checkout@v4

- name: Setup Go Environment
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: go.mod
id: go
- name: Checkout Source Code
uses: actions/checkout@v4

- name: Go Get dependencies
run: go get -v -t -d ./...
- name: Go Test
Expand Down

0 comments on commit d78aaaf

Please sign in to comment.