EVEREST-1513 | [CI] Add step to PR check to ensure generated docs are up-to-date #1018
Workflow file for this run
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: Lint and Test Charts | |
on: | |
pull_request: | |
path-ignore: | |
- 'charts/gcp-marketplace/**' | |
- 'charts/everest/**' | |
jobs: | |
lint-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Helm | |
uses: azure/[email protected] | |
with: | |
version: v3.15.4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- name: Set up chart-testing | |
uses: helm/[email protected] | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed --config .github/ct.yaml) | |
if [[ -n "$changed" ]]; then | |
echo "changed=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Run chart-testing (lint) | |
run: ct lint --config .github/ct.yaml --lint-conf .github/lintconf.yaml --excluded-charts=everest | |
- name: Create kind cluster | |
uses: helm/[email protected] | |
# Only build a kind cluster if there are chart changes to test. | |
if: steps.list-changed.outputs.changed == 'true' | |
- name: Run chart-testing (install) | |
run: | | |
OPERATOR_INSTALL=$(ct list-changed --config .github/ct.yaml | sed 's:charts/::' | grep "\-db$" | sed 's/-db$/-operator/') | |
if [ -n "$OPERATOR_INSTALL" ]; then | |
for operator in $OPERATOR_INSTALL; do helm install --namespace default $operator charts/$operator/.; done | |
fi | |
ct install --config .github/ct.yaml --excluded-charts=everest | |
if [ -n "$OPERATOR_INSTALL" ]; then | |
for operator in $OPERATOR_INSTALL; do helm uninstall --namespace default $operator; done | |
fi | |
- name: Build chart package | |
run: | | |
changed=$(ct list-changed --config .github/ct.yaml) | |
[ $(echo -n "$changed" | grep -c '^') == 1 ] && helm package $changed || echo "skipping package" | |
- name: Upload helm chart | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ./*.tgz | |
retention-days: 30 | |
if-no-files-found: ignore |