Merge pull request #12525 from helm/dependabot/go_modules/google.gola… #1
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: build-test | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'release-**' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # [email protected] | |
- name: Setup Go | |
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # [email protected] | |
with: | |
go-version: '1.20' | |
- name: Install golangci-lint | |
run: | | |
curl -sSLO https://github.com/golangci/golangci-lint/releases/download/v$GOLANGCI_LINT_VERSION/golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz | |
shasum -a 256 golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz | grep "^$GOLANGCI_LINT_SHA256 " > /dev/null | |
tar -xf golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz | |
sudo mv golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64/golangci-lint /usr/local/bin/golangci-lint | |
rm -rf golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64* | |
env: | |
GOLANGCI_LINT_VERSION: '1.51.2' | |
GOLANGCI_LINT_SHA256: '4de479eb9d9bc29da51aec1834e7c255b333723d38dbd56781c68e5dddc6a90b' | |
- name: Test style | |
run: make test-style | |
- name: Run unit tests | |
run: make test-coverage | |
- name: Test build | |
run: make build |