diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c1625428d37..be31adc7d89 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,11 +1,16 @@ 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: @@ -13,12 +18,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: Build run: make build @@ -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 @@ -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