Skip to content

fix: cache nginx-prometheus-exporter #194

fix: cache nginx-prometheus-exporter

fix: cache nginx-prometheus-exporter #194

Workflow file for this run

name: 'Verify PR'
on:
pull_request:
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: Workspace cleanup
run: rm -rf ${{ github.workspace }} && mkdir ${{ github.workspace }}
- name: Checkout working branch
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: v3.11.3
- name: Run linting (helm)
run: helm lint charts/*
- name: Run Helm Unittests
# TODO: version is pinned to '3.14.3-0.4.4' workaround
# bug https://github.com/helm-unittest/helm-unittest/issues/329
# was fixed in 'v0.5.1' but docker image is missing ref. https://github.com/helm-unittest/helm-unittest/issues/348
run: docker run --rm --name unittest --volume "$(pwd)":/apps helmunittest/helm-unittest:3.14.3-0.4.4 charts/*
- name: log into azure container registry (ACR)
uses: azure/docker-login@v2
with:
login-server: dsbacr.azurecr.io
username: ${{ vars.ORG_AZURE_CONTAINER_REGISTRY_USER }}
password: ${{ secrets.ORG_AZURE_CONTAINER_REGISTRY_PASSWORD }}
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.1
- name: Run linting (ct)
run: ct lint --all --validate-maintainers=false
- name: Create kind cluster
uses: helm/kind-action@v1.10.0
with:
config: kind-cluster-config.yaml
env:
GITHUB_WORKSPACE: ${{ env.GITHUB_WORKSPACE }}
- name: Load custom test application image
run: |
# Make image(s) available to kind cluster as it has no pullSecrets
# K8s defaults to always pull if tag is "latest", this is prevented by having
# 'imagePullPolicy: "Never"' in charts/*/ci/*-values.yaml
docker pull dsbacr.azurecr.io/dsb-norge/test-application:latest
kind load --name chart-testing docker-image dsbacr.azurecr.io/dsb-norge/test-application:latest
docker pull dsbacr.azurecr.io/dsb-norge/dsb-mssql-server:2019-latest
kind load --name chart-testing docker-image dsbacr.azurecr.io/dsb-norge/dsb-mssql-server:2019-latest
- name: Run chart-testing (install)
run: ct install --all