Skip to content

EVEREST-1513 | PR checks for Everest helm chart #6

EVEREST-1513 | PR checks for Everest helm chart

EVEREST-1513 | PR checks for Everest helm chart #6

name: Everest PR checks
on:
pull_request:
paths:
- 'charts/everest/**'
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
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: Ensure version increment for common chart
run: |
if ! git diff --quiet origin/main -- charts/everest/charts/common/; then
ct lint --chart-dirs=charts/everest/charts --excluded-charts=everest-db-namespaces
fi
- name: Ensure updated Chart.lock
run: |
helm dependency update charts/everest
helm dependency update charts/everest/charts/everest-db-namespace
if ! git diff --quiet; then
echo "Chart.lock is out-of-date"
exit 1
else
echo "Chart.lock is up-to-date"
fi
- name: Run chart-testing (lint)
run: |
ct lint --config .github/ct.yaml --lint-conf .github/lintconf.yaml --check-version-increment=false
ct lint --config .github/ct.yaml --lint-conf .github/lintconf.yaml --chart-dirs=charts/everest/charts --check-version-increment=false
- 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'
# TODO: Add more tests
- name: Run chart-testing (install)
run: |
ct install --config .github/ct.yaml --charts=everest --namespace=everest-system
- 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