1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-15 17:51:20 +00:00
kyverno/.github/workflows/helm-test.yaml
Vishal Choudhary 83254f2c3c
fix: replace base_ref with ref_name in helm test GHA (#8735)
Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com>
2023-10-25 21:53:05 +08:00

65 lines
1.9 KiB
YAML

name: helm-test
permissions: {}
on:
pull_request:
branches:
- main
- release*
paths:
- charts/**
- .github/workflows/helm-test.yaml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
helm-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup caches
uses: ./.github/actions/setup-caches
timeout-minutes: 5
continue-on-error: true
with:
build-cache-key: helm-tests
- name: Setup build env
uses: ./.github/actions/setup-build-env
timeout-minutes: 10
- name: Setup python
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0
- name: Set reference
run: echo "REF=${{ github.event.pull_request && github.base_ref || github.ref_name }}" >> $GITHUB_ENV
- name: Run chart-testing (lint)
run: |
if [[ $(ct list-changed --target-branch=$REF) ]];
then
ct lint --target-branch=$REF --check-version-increment=false --validate-maintainers=false
fi
- name: Setup test env
uses: ./.github/actions/setup-test-env
- name: Helm test
run: make helm-test
- name: Debug failure
if: failure()
uses: ./.github/actions/kyverno-logs
linter-artifacthub:
runs-on: ubuntu-latest
container:
image: artifacthub/ah
options: --user root
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Run ah lint
working-directory: ./charts/
run: ah lint