Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Update golang.org/x/net for security vulnerability #2414

Update golang.org/x/net for security vulnerability

Update golang.org/x/net for security vulnerability #2414

Workflow file for this run

name: ci
on:
push:
branches: ["main"]
pull_request:
branches: ["main", "release/**"]
env:
GO_VERSION: '1.19'
CONSUL_LICENSE: ${{ secrets.CONSUL_LICENSE }}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: ./.github/actions/goenv
with:
go-version: ${{ env.GO_VERSION }}
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.45
# Optional: golangci-lint command line arguments.
args: |
--verbose
# Optional: show only new issues if it's a pull request. The default value is `false`.
only-new-issues: false
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
skip-pkg-cache: true
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
skip-build-cache: true
test:
name: unit test (consul-version=${{ matrix.consul-version }})
strategy:
matrix:
consul-version:
- 1.13.7
- 1.13.7+ent
- 1.14.5
- 1.14.5+ent
- 1.15.1
- 1.15.1+ent
runs-on: ubuntu-latest
env:
TEST_RESULTS_DIR: /tmp/test-results/consul@${{ matrix.consul-version }}
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: ./.github/actions/goenv
with:
go-version: ${{ env.GO_VERSION }}
- name: Install Consul
shell: bash
run: |
CONSUL_VERSION="${{ matrix.consul-version }}"
FILENAME="consul_${CONSUL_VERSION}_linux_amd64.zip"
curl -sSLO "https://releases.hashicorp.com/consul/${CONSUL_VERSION}/${FILENAME}" && \
unzip "${FILENAME}" -d /usr/local/bin && \
rm "${FILENAME}"
consul version
- name: Clean Generate
run: |
echo "Checking that code generation is up-to-date"
make gen
git diff --quiet || (echo 'Working tree is dirty' && git --no-pager diff && exit 1)
- name: Test
run: |
mkdir -p $TEST_RESULTS_DIR/json
PACKAGE_NAMES=$(go list ./... | grep -v 'mocks' | grep -v 'testing' | tr '\n' ' ')
echo "Testing $(echo $PACKAGE_NAMES | wc -w) packages"
echo $PACKAGE_NAMES
gotestsum \
--format=short-verbose \
--jsonfile $TEST_RESULTS_DIR/json/go-test-race.log \
--junitfile $TEST_RESULTS_DIR/gotestsum-report.xml -- \
-race $PACKAGE_NAMES
- uses: actions/upload-artifact@v2
with:
name: test-results
path: ${{ env.TEST_RESULTS_DIR }}
e2e:
name: e2e tests (consul-image=${{ matrix.consul-image }})
strategy:
fail-fast: false
matrix:
consul-image:
- 'hashicorp/consul:1.13.7'
- 'hashicorp/consul-enterprise:1.13.7-ent'
- 'hashicorp/consul:1.14.5'
- 'hashicorp/consul-enterprise:1.14.5-ent'
- 'hashicorp/consul:1.15.1'
- 'hashicorp/consul-enterprise:1.15.1-ent'
- 'hashicorppreview/consul:1.16-dev'
- 'hashicorppreview/consul-enterprise:1.16-dev'
runs-on: ubuntu-latest
env:
TEST_RESULTS_DIR: /tmp/test-results/e2e@${{ matrix.consul-image }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Dependencies
run: |
curl -L https://kind.sigs.k8s.io/dl/v0.16.0/kind-linux-amd64 -o ./kind
chmod +x ./kind
mv ./kind /usr/local/bin/kind
curl -L https://dl.k8s.io/release/v1.22.0/bin/linux/amd64/kubectl -o ./kubectl
chmod +x ./kubectl
mv ./kubectl /usr/local/bin/kubectl
curl -L https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv4.4.0/kustomize_v4.4.0_linux_amd64.tar.gz -o kustomize_v4.4.0_linux_amd64.tar.gz
tar xvzf kustomize_v4.4.0_linux_amd64.tar.gz
mv kustomize /usr/local/bin/kustomize
rm kustomize_v4.4.0_linux_amd64.tar.gz
docker version
- uses: ./.github/actions/goenv
with:
go-version: ${{ env.GO_VERSION }}
- name: Test
env:
DOCKER_HOST_ROUTE: 172.17.0.1
DOCKER_API_VERSION: 1.41
E2E_APIGW_CONSUL_IMAGE: ${{ matrix.consul-image }}
run: |
mkdir -p $TEST_RESULTS_DIR/json
gotestsum \
--format=short-verbose \
--jsonfile $TEST_RESULTS_DIR/json/go-test-race.log \
--junitfile $TEST_RESULTS_DIR/gotestsum-report.xml -- \
-tags e2e ./internal/commands/server --failfast