-
Notifications
You must be signed in to change notification settings - Fork 29
95 lines (78 loc) · 2.47 KB
/
test.yml
File metadata and controls
95 lines (78 loc) · 2.47 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
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
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout pgdog-enterprise
uses: actions/checkout@v4
with:
repository: pgdogdev/pgdog-enterprise
ref: main-ent
path: pgdog-source
token: ${{ secrets.PGDOG_ENTERPRISE_TOKEN }}
- name: Install Helm
uses: azure/setup-helm@v4
with:
version: 'latest'
- name: Install yq
uses: mikefarah/yq@master
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Cache Rust dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
pgdog-source/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('pgdog-source/**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Install CMake 3.31
run: |
sudo apt update && sudo apt install mold -y
sudo apt remove cmake
sudo pip3 install cmake==3.31.6
- name: Build pgdog
run: cargo build --bin pgdog
working-directory: pgdog-source
- name: Validate 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
./pgdog-source/target/debug/pgdog --config=/tmp/pgdog.toml configcheck
done
echo "==> All configs valid!"