mirror of https://github.com/helm/helm
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.3 KiB
37 lines
1.3 KiB
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@755da8c3cf115ac066823e79a1e1788f8940201b # pin@v3.2.0
|
|
- name: Setup Go
|
|
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # pin@3.5.0
|
|
with:
|
|
go-version: '1.18'
|
|
- 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.46.2'
|
|
GOLANGCI_LINT_SHA256: '242cd4f2d6ac0556e315192e8555784d13da5d1874e51304711570769c4f2b9b'
|
|
- name: Test style
|
|
run: make test-style
|
|
- name: Run unit tests
|
|
run: make test-coverage
|
|
- name: Test build
|
|
run: make test build
|