mirror of
https://github.com/flant/ovpn-admin.git
synced 2025-12-13 20:36:13 -08:00
108 lines
2.6 KiB
YAML
108 lines
2.6 KiB
YAML
name: Chart Test
|
|
on:
|
|
push:
|
|
tags:
|
|
- v*
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
chart:
|
|
name: Chart
|
|
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
changed: ${{ steps.changes.outputs.changed }}
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Helm
|
|
uses: azure/setup-helm@v4
|
|
with:
|
|
version: v3.10.3
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.10"
|
|
|
|
- name: Set up chart-testing
|
|
uses: helm/chart-testing-action@v2.6.1
|
|
|
|
- name: Lint
|
|
run: ct lint
|
|
|
|
- name: Check generated docs
|
|
run: |
|
|
make docs
|
|
test "$(git diff --name-only)" == "" \
|
|
|| ( printf >&2 "\nREADME files are not up to date (run 'make docs'), differences:\n\n%s\n\n" "$(git diff)" ; exit 1 ; )
|
|
|
|
- name: Detect changes
|
|
id: changes
|
|
run: |
|
|
changed=$(ct list-changed)
|
|
if [[ -n "$changed" ]]; then
|
|
echo "changed=true" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
chart-test:
|
|
name: Chart Test
|
|
runs-on: ubuntu-latest
|
|
needs: chart
|
|
if: needs.chart.outputs.changed == 'true'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
kube: ["1.25", "1.29", "1.31"]
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Helm
|
|
uses: azure/setup-helm@v4
|
|
with:
|
|
version: v3.10.3
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.10"
|
|
|
|
- name: Set up chart-testing
|
|
uses: helm/chart-testing-action@v2.6.1
|
|
|
|
# See https://github.com/kubernetes-sigs/kind/releases/tag/v0.17.0
|
|
- name: Determine KinD node image version
|
|
id: node_image
|
|
run: |
|
|
case ${{ matrix.kube }} in
|
|
1.25)
|
|
NODE_IMAGE=kindest/node:v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1 ;;
|
|
1.29)
|
|
NODE_IMAGE=kindest/node:v1.29.12@sha256:62c0672ba99a4afd7396512848d6fc382906b8f33349ae68fb1dbfe549f70dec ;;
|
|
1.31)
|
|
NODE_IMAGE=kindest/node:v1.31.2@sha256:0526eb5cd8d892ed79b56feb48d17eeee1f719f55d5c35cef468f053caffad32 ;;
|
|
esac
|
|
|
|
echo "image=$NODE_IMAGE" >> $GITHUB_OUTPUT
|
|
|
|
- name: Create KinD cluster
|
|
uses: helm/kind-action@v1.12.0
|
|
with:
|
|
version: v0.17.0
|
|
node_image: ${{ steps.node_image.outputs.image }}
|
|
|
|
- name: Test
|
|
run: ct install
|