Skip to content

Fix Helm Downloader Credential Handling #1565

Fix Helm Downloader Credential Handling

Fix Helm Downloader Credential Handling #1565

Workflow file for this run

name: lint-and-test
on:
pull_request_target:
push:
branches:
- main
workflow_dispatch:
workflow_call:
permissions:
contents: read
pull-requests: read
jobs:
test:
name: Run tests
runs-on: large_runner
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Cache go-build and mod
uses: actions/cache@v3
with:
path: |
~/.cache/go-build/
~/go/pkg/mod/
key: go-${{ hashFiles('go.sum') }}
restore-keys: |
go-
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
- name: Unit test
run: |
PATH=$PATH:$(go env GOPATH)/bin make build
PATH=$PATH:$(go env GOPATH)/bin make test
lint:
name: Lint
runs-on: large_runner
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Cache go-build and mod
uses: actions/cache@v3
with:
path: |
~/.cache/go-build/
~/go/pkg/mod/
key: go-${{ hashFiles('go.sum') }}
restore-keys: |
go-
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
- name: Install goimports
run: |
go install golang.org/x/tools/cmd/goimports@latest
- name: Setup lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.49.0
- name: Lint
run: |
PATH=$PATH:$(go env GOPATH)/bin make check
generate:
name: DeepCopy verification
runs-on: large_runner
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Cache go-build and mod
uses: actions/cache@v3
with:
path: |
~/.cache/go-build/
~/go/pkg/mod/
key: go-${{ hashFiles('go.sum') }}
restore-keys: |
go-
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
- name: Generate DeepCopy
run: |
PATH=$PATH:$(go env GOPATH)/bin make generate-deepcopy
- name: Check for diff
run: |
git diff --exit-code --shortstat