Skip to content

Merge pull request #2473 from headlamp-k8s/pluginlib-test #380

Merge pull request #2473 from headlamp-k8s/pluginlib-test

Merge pull request #2473 from headlamp-k8s/pluginlib-test #380

name: Lint and Test Charts
on:
pull_request:
paths:
- charts/**
- '!charts/**/README.md'
push:
branches:
- main
- rc-*
- testing-rc-*
permissions:
contents: read
jobs:
lint-test:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@18bc76811624f360dbd7f18c2d4ecb32c7b87bab # v1.1
with:
version: v3.7.0
- uses: actions/setup-python@e9aba2c848f5ebd159c070c61ea2c4e2b122355e # v2.3.4
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config .github/ct.yaml)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Run chart-testing (lint)
run: ct lint --config .github/ct.yaml
- name: Setup Minikube
uses: medyagh/setup-minikube@d8c0eb871f6f455542491d86a574477bd3894533 # latest
- name: Build image & Run chart-testing (install)
run: |
export SHELL=/bin/bash
eval $(minikube -p minikube docker-env)
DOCKER_IMAGE_VERSION=ci-test make image
echo -n "verifying images:"
docker images
ct install --config .github/ct.yaml --helm-extra-set-args="--set=image.tag=ci-test --set image.pullPolicy=Never"