Skip to content

Commit

Permalink
workflows: update actions and workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
yyforyongyu committed Aug 20, 2024
1 parent da83dc2 commit 3fdad4b
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
name: Build and Test
on: [push, pull_request]

concurrency:
# Cancel any previous workflows if they are from a PR or push.
group: ${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
# go needs absolute directories, using the $HOME variable doesn't work here.
GOCACHE: /home/runner/work/go/pkg/build
GOPATH: /home/runner/work/go
GO_VERSION: 1.17.5
GO_VERSION: 1.22.6

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- name: Check out source
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Build
run: make build
Expand All @@ -28,12 +33,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- name: Check out source
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Test
run: make unit-cover
Expand Down Expand Up @@ -76,12 +81,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- name: Check out source
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Test
run: make unit-race

0 comments on commit 3fdad4b

Please sign in to comment.