Infra 30645: update rds helpers repo #838
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: Test Charts | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
pullrequest: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: v3.13.0 | |
- name: Configuer Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.13 | |
- name: Add repo dependencies | |
run: | | |
for d in ./charts/*/ ; do | |
echo $d | |
cd $d | |
helm dependency list | grep -v "REPOSITORY" | grep -v -e '^$' | awk '{ system("helm repo add " $1 " " $3)}' | |
cd ../.. | |
done | |
- name: Set up chart-testing | |
uses: helm/[email protected] | |
- name: List changed charts | |
id: list-changed | |
run: | | |
## If executed with debug this won't work anymore. | |
changed=$(ct list-changed --target-branch main) | |
charts=$(echo "$changed" | tr '\n' ' ' | xargs) | |
if [[ -n "$changed" ]]; then | |
echo "changed=true" >> $GITHUB_OUTPUT | |
echo "changed_charts=$charts" >> $GITHUB_OUTPUT | |
fi | |
- name: Run chart-testing (lint) | |
run: ct lint --target-branch main --validate-maintainers=false | |
- name: Run unit tests | |
uses: mintel/helm-testing-action@master | |
with: | |
exec: "unit-tests" | |
charts: "${{ steps.list-changed.outputs.changed_charts }}" | |
if: steps.list-changed.outputs.changed == 'true' | |
- name: Check docs updated | |
uses: mintel/[email protected] | |
with: | |
working-chart: "${{ steps.list-changed.outputs.changed_charts }}" | |
fail-on-diff: true |