[NET-4865] security: Upgrade Go and net/http CVE-2023-29406 #686
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: consul-dataplane-checks | |
on: | |
push: | |
branches: | |
- main | |
- 'release/*.*.x' | |
pull_request: | |
jobs: | |
get-go-version: | |
name: "Determine Go toolchain version" | |
runs-on: ubuntu-latest | |
outputs: | |
go-version: ${{ steps.get-go-version.outputs.go-version }} | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: Determine Go version | |
id: get-go-version | |
# We use .go-version as our source of truth for current Go | |
# version, because "goenv" can react to it automatically. | |
run: | | |
echo "Building with Go $(cat .go-version)" | |
echo "go-version=$(cat .go-version)" >> $GITHUB_OUTPUT | |
unit-tests: | |
name: unit-tests | |
needs: | |
- get-go-version | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | |
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | |
with: | |
# pinning this to 1.20.5 because this issue in go-testcontainers occurs | |
# in 1.20.6 with the error "http: invalid Host header, host port waiting failed" | |
# https://github.com/testcontainers/testcontainers-go/issues/1359 | |
# remove setting this when the above issue is fixed so that the job will | |
# just get the go version from .go-version. | |
go-version: 1.20.5 | |
- 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/release-default:${{ env.VERSION }}" | |
golangci: | |
name: lint | |
needs: | |
- get-go-version | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | |
with: | |
go-version: ${{ needs.get-go-version.outputs.go-version }} | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@639cd343e1d3b897ff35927a75193d57cfcba299 # v3.6.0 |