Skip to content

build(deps): bump golang.org/x/crypto from 0.27.0 to 0.31.0 in /tools… #2948

build(deps): bump golang.org/x/crypto from 0.27.0 to 0.31.0 in /tools…

build(deps): bump golang.org/x/crypto from 0.27.0 to 0.31.0 in /tools… #2948

Workflow file for this run

name: Linters
on:
push:
branches:
- main
- "release/**"
pull_request:
paths:
- .github/workflows/linters.yml
- .golangci.yml
- go.sum
- GNUmakefile
- internal/**
- main.go
- tools/**
jobs:
go_mod_download:
name: go mod download
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version-file: tools/go.mod
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
continue-on-error: true
id: cache-go-pkg-mod
timeout-minutes: 2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
# Needed to access private repositories. Unfortunately, this cannot be restricted to specific repositories
- run: git config --global url."https://${{ secrets.PRIVATE_GOMOD_TOKEN }}:[email protected]/hashicorp".insteadOf "https://github.com/hashicorp"
- if: steps.cache-go-pkg-mod.outputs.cache-hit != 'true' || steps.cache-go-pkg-mod.outcome == 'failure'
run: go mod download
golangci-lint:
needs: [go_mod_download]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version-file: tools/go.mod
- name: GOCACHE
run: |
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
continue-on-error: true
timeout-minutes: 2
with:
# TODO: Replace with supported mechanism when it is supported
# https://github.com/actions/setup-go/issues/54
path: ${{ env.GOCACHE }}
key: ${{ runner.os }}-GOCACHE-${{ hashFiles('go.sum') }}-${{ hashFiles('internal/**') }}
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
continue-on-error: true
timeout-minutes: 2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
- run: cd tools && go install github.com/golangci/golangci-lint/cmd/golangci-lint
# Needed to access private repositories. Unfortunately, this cannot be restricted to specific repositories
- run: git config --global url."https://${{ secrets.PRIVATE_GOMOD_TOKEN }}:[email protected]/hashicorp".insteadOf "https://github.com/hashicorp"
- run: golangci-lint run ./internal/...
unit-test:
needs: [go_mod_download]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version-file: tools/go.mod
- name: GOCACHE
run: |
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
continue-on-error: true
timeout-minutes: 2
with:
# TODO: Replace with supported mechanism when it is supported
# https://github.com/actions/setup-go/issues/54
path: ${{ env.GOCACHE }}
key: ${{ runner.os }}-GOCACHE-${{ hashFiles('go.sum') }}-${{ hashFiles('internal/**') }}
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
continue-on-error: true
timeout-minutes: 2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
# Needed to access private repositories. Unfortunately, this cannot be restricted to specific repositories
- run: git config --global url."https://${{ secrets.PRIVATE_GOMOD_TOKEN }}:[email protected]/hashicorp".insteadOf "https://github.com/hashicorp"
- run: make test
semgrep:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: semgrep
uses: returntocorp/semgrep-action@713efdd345f3035192eaa63f56867b88e63e4e5d # v1
importlint:
needs: [go_mod_download]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version-file: tools/go.mod
- name: GOCACHE
run: |
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
continue-on-error: true
timeout-minutes: 2
with:
# TODO: Replace with supported mechanism when it is supported
# https://github.com/actions/setup-go/issues/54
path: ${{ env.GOCACHE }}
key: ${{ runner.os }}-GOCACHE-${{ hashFiles('go.sum') }}-${{ hashFiles('internal/**') }}
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
continue-on-error: true
timeout-minutes: 2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
- run: cd tools && go install github.com/pavius/impi/cmd/impi
- run: impi --local . --scheme stdThirdPartyLocal --ignore-generated=true ./...