Skip to content

feat: autoreload config + tests #19

feat: autoreload config + tests

feat: autoreload config + tests #19

Workflow file for this run

name: Render Helm chart
on:
push:
pull_request:
jobs:
render:
runs-on: blacksmith-4vcpu-ubuntu-2404
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Helm
uses: azure/setup-helm@v4
with:
version: latest
- name: Run chart tests
run: ./test/test.sh
validate-configs:
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 30
permissions:
contents: read
env:
CONTROL2_IMAGE: ghcr.io/pgdogdev/pgdog-enterprise/control:main-ent
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Helm
uses: azure/setup-helm@v4
with:
version: latest
- name: Install yq
uses: mikefarah/yq@master
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.PGDOG_ENTERPRISE_TOKEN }}
- name: Pull control2 image
run: docker pull "$CONTROL2_IMAGE"
- name: Validate generated control configs
run: |
set -eo pipefail
for values_file in test/values-*.yaml; do
name=$(basename "$values_file" .yaml | sed 's/values-//')
echo "==> Validating control config for $name..."
rm -f /tmp/control.toml
./test/generate-config.sh "$values_file" /tmp/control.toml
docker run --rm \
-v /tmp/control.toml:/tmp/control.toml:ro \
"$CONTROL2_IMAGE" \
configcheck --config /tmp/control.toml
done
echo "==> All control configs valid!"