chore(merlin): Update PredictionJobBaseImage.MainAppPath in _config.tpl #1092
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: Test Charts | |
on: pull_request | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: v3.8.1 | |
# Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale), | |
# yamllint (https://github.com/adrienverge/yamllint) which require Python and | |
# generate-creds step below which uses python to parse yaml file. | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.7 | |
- name: Set up chart-testing | |
uses: helm/[email protected] | |
with: | |
version: v3.7.0 | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed --config .github/config/ct.yaml | tr '\n' ' ') | |
if [[ -n "$changed" ]]; then | |
echo "changed=true" >> $GITHUB_OUTPUT | |
echo "charts_changed=$changed" >> $GITHUB_OUTPUT | |
fi | |
- name: Add dependency chart repos | |
run: | | |
for dir in $(ls -d charts/*/); do | |
num_of_deps=$(( $(helm dependency list $dir 2> /dev/null | tail +2 | wc -l ) -1 )) | |
if [ $num_of_deps -gt 0 ]; then | |
helm dependency list $dir 2> /dev/null | tail +2 | head -n $num_of_deps | awk '{ print " " $1 " " $3 }' | grep -v "file://" | xargs -n 2 helm repo add --force-update | |
fi | |
done | |
- name: Install plugin and run Unit-tests on changed charts | |
id: unit-tests | |
env: | |
CHARTS_CHANGED: ${{ steps.list-changed.outputs.charts_changed }} | |
# Pinning the unittest plugin version as the latest master has a regression in matchRegex | |
UNITTEST_PLUGIN_VERSION: v0.2.11 | |
run: | | |
helm plugin install https://github.com/quintush/helm-unittest --version=$UNITTEST_PLUGIN_VERSION > /dev/null 2>&1 | |
for chart in $CHARTS_CHANGED; do | |
chart=`echo $chart | sed 's/ *$//g'` | |
cd $chart | |
helm dep build > /dev/null 2>&1 | |
helm unittest --helm3 -u -d . | |
cd ../../ | |
done | |
- name: Create kind cluster | |
uses: helm/[email protected] | |
if: steps.list-changed.outputs.changed == 'true' | |
with: | |
node_image: kindest/node:v1.22.7 | |
- name: Install metallb in kind cluster for load balancer services | |
if: steps.list-changed.outputs.changed == 'true' | |
run: | | |
./scripts/install_metallib.sh | |
- name: Add cluster credentials as a file if caraml/merlin/turing is being installed | |
env: | |
CHARTS_CHANGED: ${{ steps.list-changed.outputs.charts_changed }} | |
run: | | |
if [[ $(echo $CHARTS_CHANGED | grep 'charts/\(merlin\|turing\|caraml\)$') ]]; then | |
CHARTS_CHANGED=$CHARTS_CHANGED ./scripts/generate-cluster-creds.sh kind chart-testing | |
fi | |
- name: Run chart-testing (install) | |
run: ct install --config .github/config/ct.yaml --excluded-charts kserve,common --print-config | |
- name: Run chart-testing for kserve (install) | |
env: | |
CHARTS_CHANGED: ${{ steps.list-changed.outputs.charts_changed }} | |
run: | | |
if [[ $(echo $CHARTS_CHANGED | grep 'charts/kserve') ]]; then | |
ct install --charts charts/kserve --namespace kserve --helm-extra-set-args "--create-namespace" --debug | |
fi |