Chore(charts): add tests for some charts #121
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: charts/all | |
on: pull_request | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.head_ref }} | |
cancel-in-progress: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Fetch default branch | |
run: git fetch origin ${{ github.event.repository.default_branch }}:${{ github.event.repository.default_branch }} | |
- name: Set up Helm | |
uses: azure/setup-helm@v4 | |
with: | |
version: v3.16.3 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: Set up chart-testing | |
uses: helm/chart-testing-action@v2.6.1 | |
with: | |
version: "v3.11.0" | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed --config ct.yaml --target-branch ${{ github.event.repository.default_branch }}) | |
if [[ -n "$changed" ]]; then | |
echo "changed=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Run chart-testing (lint) | |
run: > | |
ct lint | |
--config ct.yaml | |
--target-branch ${{ github.event.repository.default_branch }} | |
- name: Install helm unittest plugin | |
if: steps.list-changed.outputs.changed == 'true' | |
run: | | |
helm env | |
helm plugin install https://github.com/helm-unittest/helm-unittest.git --version 0.7.0 | |
- name: Run helm unittest on changed charts | |
if: env.changed != '' | |
run: | | |
for chart in $changed; do | |
echo "Running helm unittest for $chart" | |
helm unittest -f "$chart/tests/unit/*_test.yaml" "$chart" | |
done | |
- name: Create kind cluster | |
uses: helm/kind-action@v1.10.0 | |
if: steps.list-changed.outputs.changed == 'true' | |
- name: Run chart-testing (install) | |
run: > | |
ct install | |
--config ct.yaml | |
--target-branch ${{ github.event.repository.default_branch }} | |
--excluded-charts api-signer | |
--excluded-charts aws-pod-eip-controller | |
--excluded-charts blockchain-listener | |
--excluded-charts discord-faucet | |
--excluded-charts faucet | |
--excluded-charts hermes-relayer | |
--excluded-charts horcrux | |
--excluded-charts landing | |
--excluded-charts landing-webhook | |
--excluded-charts main | |
--excluded-charts message-handler | |
--excluded-charts phoenixbot | |
--excluded-charts snapshots | |
--excluded-charts wardend | |
--excluded-charts wardenkms | |
--excluded-charts webhooks |