Update PSMDB-DB Readme #848
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/**' | |
jobs: | |
lint-test: | |
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.9.2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.7' | |
- 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 | |
- 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 | |
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@v3 | |
with: | |
path: ./*.tgz | |
retention-days: 30 | |
if-no-files-found: ignore |