Update release.yml #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, lint and test | |
on: | |
push: | |
branches: | |
- main | |
- renovate/** | |
pull_request: | |
jobs: | |
build: | |
name: Build integration for | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
goos: [ linux ] | |
goarch: [ amd64, arm64, arm ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- name: Build integration | |
env: | |
GOOS: ${{ matrix.goos }} | |
GOARCH: ${{ matrix.goarch }} | |
run: | | |
make build | |
chart-lint: | |
name: Helm chart Lint | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: helm/[email protected] | |
- name: Lint charts | |
run: ct --config .github/ct.yaml lint --debug | |
- name: Check for changed installable charts | |
id: list-changed | |
run: | | |
changed=$(ct --config .github/ct.yaml list-changed) | |
if [[ -n "$changed" ]]; then | |
echo "changed=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Run helm unit tests | |
if: steps.list-changed.outputs.changed == 'true' | |
run: | | |
helm plugin install https://github.com/helm-unittest/helm-unittest --version=0.3.1 | |
for chart in $(ct --config .github/ct.yaml list-changed); do | |
if [ -d "$chart/tests/" ]; then | |
helm unittest $chart | |
else | |
echo "No unit tests found for $chart" | |
fi | |
done | |
static-analysis: | |
name: Run all static analysis checks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- uses: newrelic/newrelic-infra-checkers@v1 | |
with: | |
golangci-lint-config: golangci-lint-limited | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
continue-on-error: ${{ github.event_name != 'pull_request' }} | |
with: | |
only-new-issues: true | |
skip-pkg-cache: true | |
skip-build-cache: true | |
test: | |
name: Run unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- name: Test | |
run: make test |