2021-07-14 20:10:41 +01:00
|
|
|
name: helm-test
|
2023-01-03 12:25:19 +01:00
|
|
|
|
2021-07-14 20:10:41 +01:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
2022-03-08 02:08:46 +01:00
|
|
|
- main
|
|
|
|
- release*
|
2021-07-14 20:10:41 +01:00
|
|
|
paths:
|
2022-03-08 02:08:46 +01:00
|
|
|
- charts/**
|
|
|
|
- .github/workflows/helm-test.yaml
|
2021-07-14 20:10:41 +01:00
|
|
|
|
2023-01-06 16:24:55 +01:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2021-07-14 20:10:41 +01:00
|
|
|
jobs:
|
|
|
|
helm-tests:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-04-14 07:52:25 +00:00
|
|
|
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
2023-01-05 16:52:52 +01:00
|
|
|
- name: Setup build env
|
|
|
|
uses: ./.github/actions/setup-build-env
|
2023-01-22 22:29:51 +01:00
|
|
|
with:
|
|
|
|
build-cache-key: helm-tests
|
2023-01-05 16:52:52 +01:00
|
|
|
- name: Setup python
|
2023-05-25 23:02:47 +08:00
|
|
|
uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4.6.1
|
2021-07-14 20:10:41 +01:00
|
|
|
with:
|
|
|
|
python-version: 3.7
|
|
|
|
- name: Set up chart-testing
|
2023-03-27 10:47:32 +00:00
|
|
|
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0
|
2021-07-14 20:10:41 +01:00
|
|
|
- name: Run chart-testing (lint)
|
2022-12-09 17:10:16 +01:00
|
|
|
run: |
|
|
|
|
if [[ $(ct list-changed --target-branch=main) ]];
|
|
|
|
then
|
|
|
|
ct lint --target-branch=main --check-version-increment=false
|
|
|
|
fi
|
2023-01-20 08:40:44 +01:00
|
|
|
- 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
|
2023-04-03 15:56:52 +08:00
|
|
|
|
|
|
|
linter-artifacthub:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: artifacthub/ah
|
|
|
|
options: --user root
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-04-14 07:52:25 +00:00
|
|
|
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
2023-04-03 15:56:52 +08:00
|
|
|
- name: Run ah lint
|
|
|
|
working-directory: ./charts/
|
|
|
|
run: ah lint
|