2021-07-14 19:10:41 +00:00
|
|
|
name: helm-test
|
2023-01-03 11:25:19 +00:00
|
|
|
|
2021-07-14 19:10:41 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
2022-03-08 01:08:46 +00:00
|
|
|
- main
|
|
|
|
- release*
|
2021-07-14 19:10:41 +00:00
|
|
|
paths:
|
2022-03-08 01:08:46 +00:00
|
|
|
- charts/**
|
|
|
|
- .github/workflows/helm-test.yaml
|
2021-07-14 19:10:41 +00:00
|
|
|
|
2023-01-06 15:24:55 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2021-07-14 19:10:41 +00:00
|
|
|
jobs:
|
|
|
|
helm-tests:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-01-06 06:50:37 +00:00
|
|
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
2023-01-05 15:52:52 +00:00
|
|
|
- name: Setup build env
|
|
|
|
uses: ./.github/actions/setup-build-env
|
2023-01-22 21:29:51 +00:00
|
|
|
with:
|
|
|
|
build-cache-key: helm-tests
|
2023-01-05 15:52:52 +00:00
|
|
|
- name: Setup python
|
2023-01-13 07:38:52 +00:00
|
|
|
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0
|
2021-07-14 19:10:41 +00:00
|
|
|
with:
|
|
|
|
python-version: 3.7
|
|
|
|
- name: Set up chart-testing
|
2022-12-06 09:21:52 +00:00
|
|
|
uses: helm/chart-testing-action@afea100a513515fbd68b0e72a7bb0ae34cb62aec # v2.3.1
|
2021-07-14 19:10:41 +00:00
|
|
|
- name: Run chart-testing (lint)
|
2022-12-09 16:10:16 +00:00
|
|
|
run: |
|
|
|
|
if [[ $(ct list-changed --target-branch=main) ]];
|
|
|
|
then
|
|
|
|
ct lint --target-branch=main --check-version-increment=false
|
|
|
|
fi
|
2023-01-20 07:40:44 +00: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
|