-
Notifications
You must be signed in to change notification settings - Fork 33
69 lines (56 loc) · 1.74 KB
/
Copy pathtest.yml
File metadata and controls
69 lines (56 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Test Helm chart
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: blacksmith-4vcpu-ubuntu-2404
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: Install kubeconform
run: |
curl -sL https://github.com/yannh/kubeconform/releases/latest/download/kubeconform-linux-amd64.tar.gz | tar xz
sudo mv kubeconform /usr/local/bin/
- name: Run tests
run: ./test/test.sh
validate-configs:
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 30
permissions:
contents: read
env:
PGDOG_IMAGE: ghcr.io/pgdogdev/pgdog-enterprise: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: Pull pgdog image
run: docker pull "$PGDOG_IMAGE"
- name: Validate generated pgdog configs
run: |
set -eo pipefail
for values_file in test/values-*.yaml; do
name=$(basename "$values_file" .yaml | sed 's/values-//')
echo "==> Validating config for $name..."
rm -f /tmp/pgdog.toml
./test/generate-config.sh "$values_file" /tmp/pgdog.toml
docker run --rm \
-v /tmp/pgdog.toml:/tmp/pgdog.toml:ro \
"$PGDOG_IMAGE" \
/usr/local/bin/pgdog --config=/tmp/pgdog.toml configcheck
done
echo "==> All configs valid!"