Skip to content

Backport of update go version to 1.22.4 into release/1.5.x #1489

Backport of update go version to 1.22.4 into release/1.5.x

Backport of update go version to 1.22.4 into release/1.5.x #1489

name: consul-dataplane-checks
on:
push:
branches:
- main
- 'release/*.*.x'
pull_request:
jobs:
get-go-version:
uses: ./.github/workflows/reusable-get-go-version.yml
unit-tests:
name: unit-tests
needs:
- get-go-version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ needs.get-go-version.outputs.go-version }}
- run: go test ./... -p 1 # disable parallelism to avoid port conflicts from default metrics and lifecycle server configuration
integration-tests:
name: integration-tests
needs:
- get-go-version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ needs.get-go-version.outputs.go-version }}
- run: make docker
# Currently the server version below is set to 1.15-dev: integration-tests/main_test.go
- run: echo "VERSION=$(make version)" >> $GITHUB_ENV
- run: cd integration-tests && go test -dataplane-image="consul-dataplane:${{ env.VERSION }}"
golangci:
name: lint
needs:
- get-go-version
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ needs.get-go-version.outputs.go-version }}
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: golangci-lint
uses: golangci/golangci-lint-action@82d40c283aeb1f2b6595839195e95c2d6a49081b # v5.0.0