Skip to content

Commit

Permalink
chore(github): moved test integration to test workflow as a job
Browse files Browse the repository at this point in the history
  • Loading branch information
paulobressan committed Jun 27, 2024
1 parent f14b116 commit b11b3e1
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 48 deletions.
48 changes: 0 additions & 48 deletions .github/workflows/integration.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,41 @@ jobs:

- name: Run Unit Tests
run: cargo test --lib

integration:
services:
zookeeper:
image: confluentinc/cp-zookeeper:latest
options: >-
--env ZOOKEEPER_CLIENT_PORT=2181
kafka:
image: confluentinc/cp-kafka:latest
ports:
- 9092:9092
options: >-
--env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
--env KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Create k8s Kind Cluster
uses: helm/[email protected]
with:
cluster_name: "k8scluster"

- name: Build RPC
run: docker build -t rpc:1.0 -f docker/dockerfile.rpc .

- name: Load Docker Image
run: kind load docker-image rpc:1.0 --name k8scluster

- name: Apply main manifest
run: kubectl apply -f test/main.yaml

- name: Validate controller
run: ./test/expect

1 change: 1 addition & 0 deletions test/expect
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ echo "Checking executation"
while [ $ATTEMPT -lt $MAX_ATTEMPT ]; do
let ATTEMPT=ATTEMPT+1
kubectl get pod -n demeter-rpc
kubectl logs -n demeter-rpc $(kubectl get pods -n demeter-rpc -o json | jq -r '.items | sort_by(.metadata.creationTimestamp) | .[0].metadata.name')
sleep 2
done

0 comments on commit b11b3e1

Please sign in to comment.