chore: Bump github action versions #1016
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: "helm-charts/test" | |
on: pull_request | |
jobs: | |
lint-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node_image_version: | |
- v1.21.1 | |
- v1.22.4 | |
name: lint-test (k8s ${{ matrix.node_image_version }}) | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Fetch history | |
run: git fetch --prune --unshallow | |
- name: Set up Helm | |
uses: azure/setup-helm@v4 | |
with: | |
version: v3.6.3 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
check-latest: true | |
- name: Install chart-testing tools | |
id: lint | |
uses: helm/chart-testing-action@v2 | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed) | |
if [[ -n "$changed" ]]; then | |
echo "changed=true" >> "$GITHUB_OUTPUT" | |
fi | |
- name: Run chart-testing (lint) | |
run: ct lint | |
- name: Create kind cluster | |
uses: helm/[email protected] | |
with: | |
node_image: kindest/node:${{ matrix.node_image_version }} | |
if: steps.list-changed.outputs.changed == 'true' | |
# Our Enterprise chart requires some resources created | |
- name: Create Enterprise Test Resources | |
run: | | |
kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.5.4/cert-manager.yaml | |
sleep 30 # wait for CertManager | |
kubectl apply -f ./charts/influxdb-enterprise/example-resources.yaml | |
kubectl create secret generic influxdb-license --from-literal=INFLUXDB_ENTERPRISE_LICENSE_KEY=${INFLUXDB_ENTERPRISE_LICENSE_KEY} | |
env: | |
INFLUXDB_ENTERPRISE_LICENSE_KEY: "${{ secrets.INFLUXDB_ENTERPRISE_LICENSE_KEY }}" | |
if: steps.list-changed.outputs.changed == 'true' | |
- name: Run chart-testing (install) | |
id: install | |
run: | | |
ct install --namespace=default 2>&1 | tee $RUNNER_TEMP/$GITHUB_RUN_NUMBER.txt | |
# When https://github.com/helm/chart-testing/issues/212 is fixed, this can be used to set the license key instead of using env from secret | |
# run: ct install --namespace=default --helm-extra-args="--set license.key=${INFLUXDB_ENTERPRISE_LICENSE_KEY}" | |
# env: | |
# INFLUXDB_ENTERPRISE_LICENSE_KEY: "${{ secrets.INFLUXDB_ENTERPRISE_LICENSE_KEY }}" | |
if: steps.list-changed.outputs.changed == 'true' | |
- name: Check logs for errors | |
run: | | |
set +e | |
patterns="Error loading config file" | |
grep -f $GITHUB_WORKSPACE/.github/workflows/patterns.txt $RUNNER_TEMP/$GITHUB_RUN_NUMBER.txt | |
if [[ $? -eq 0 ]]; then | |
echo "::error:: Errors found in logs" | |
exit 1 | |
fi | |
if: steps.list-changed.outputs.changed == 'true' |