Skip to content

Update to Go v1.21 #309

Update to Go v1.21

Update to Go v1.21 #309

Workflow file for this run

name: Helm Chart Tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
test-build:
name: test-helm-chart
runs-on: ubuntu-latest
env:
IMG: skyscanner/kms-issuer:dev
CERT_MANAGER_VERSION: v1.13.2
steps:
- name: Checkout
uses: actions/checkout@v3.1.0
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: ^1.21
- name: Set up Helm
uses: azure/setup-helm@v3.5
with:
version: v3.5.2
# Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and
# yamllint (https://github.com/adrienverge/yamllint) which require Python
- uses: actions/setup-python@v4.5.0
with:
python-version: '3.x'
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.3.1
with:
version: v3.6.0
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config ct.yaml)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Run chart-testing (lint)
run: ct lint --config ct.yaml
if: steps.list-changed.outputs.changed == 'true'
- name: Create k8s Kind Cluster
uses: helm/kind-action@v1.4.0
with:
cluster_name: kind
if: steps.list-changed.outputs.changed == 'true'
- name: Install cert-manager
run: kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/${CERT_MANAGER_VERSION}/cert-manager.yaml
if: steps.list-changed.outputs.changed == 'true'
- name: Build the testing kms-issuer docker image
run: docker build -t ${IMG} .
if: steps.list-changed.outputs.changed == 'true'
- name: Load test docker image into the kind cluster
run: kind load docker-image ${IMG}
if: steps.list-changed.outputs.changed == 'true'
- name: Run chart-testing (install)
run: ct install --config ct.yaml --helm-extra-set-args "--set=img.repository=${REPOSITORY},--set=img.tag=${TAG}"
if: steps.list-changed.outputs.changed == 'true'
helm-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3.1.0
- name: Run helm-docs
uses: docker://jnorwood/helm-docs:v1.10.0