Skip to content

Commit

Permalink
ci: test in kind cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
alisterd51 committed Jan 29, 2024
1 parent 3ff0cea commit 25b5bfb
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/test_in_kind.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Python test in kind cluster

on: pull_request

jobs:
sentinel-cluster:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/[email protected]
with:
version: v3.12.3
- name: Create k8s Kind Cluster
uses: helm/[email protected]
- name: Install Charts
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add elastic https://helm.elastic.co
helm repo update
helm install my-postgresql bitnami/postgresql \
--version 13.2.30 \
--set global.postgresql.auth.username=test \
--set global.postgresql.auth.password=password \
--set global.postgresql.auth.database=test
helm install my-redis bitnami/redis \
--version 18.8.0 \
--set sentinel.enabled=true \
--set global.redis.password=password \
--set master.disableCommands={} \
--set replica.disableCommands={} \
--set master.serviceAccount.create=false \
--set master.serviceAccount.automountServiceAccountToken=true \
--set replica.serviceAccount.create=false \
--set replica.serviceAccount.automountServiceAccountToken=true
helm install my-elasticsearch elastic/elasticsearch \
--version 7.17.3 \
--set replicas=1 \
--set minimumMasterNodes=1
kubectl rollout status statefulset my-postgresql \
--timeout=5m
kubectl rollout status statefulset elasticsearch-master \
--timeout=5m
kubectl rollout status statefulset my-redis-node \
--timeout=5m
- name: build and test
run: |
docker build . -t remoulade -f tests/Dockerfile \
--build-arg="CONFIGURATION=tests/configuration.sentinel.kubernetes.yaml"
kind load docker-image remoulade
kubectl apply -f tests/remoulade.yaml
kubectl wait \
--for=condition=complete \
--timeout=2m job/remoulade

0 comments on commit 25b5bfb

Please sign in to comment.