Skip to content

HDDS-11834. Test chart on push events #23

HDDS-11834. Test chart on push events

HDDS-11834. Test chart on push events #23

Workflow file for this run

name: Test Charts
on:
pull_request:
types: [opened, synchronize]
push:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
submodules: recursive
- name: Set up Helm
uses: azure/setup-helm@v4.2.0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Set up chart-testing
uses: ./.github/actions/chart-testing-action
- name: Find changes (PR)
if: github.event_name == 'pull_request'
run: |
changed=$(ct list-changed --target-branch ${{ github.base_ref }})
if [[ -n "$changed" ]]; then
echo "test_scope=--target-branch ${{ github.base_ref }}" >> "$GITHUB_ENV"
fi
- name: Find changes (push)
if: github.event_name != 'pull_request'
run: |
echo "test_scope=--all" >> "$GITHUB_ENV"
- name: Run chart-testing (lint)
if: env.test_scope != ''
run: ct lint ${{ env.test_scope }} --validate-maintainers=false --check-version-increment=false
- name: Create kind cluster
if: env.test_scope != ''
uses: ./.github/actions/kind-action
- name: Run chart-testing (install)
if: env.test_scope != ''
run: ct install ${{ env.test_scope }}