Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pankajastro committed Aug 9, 2024
1 parent 90faa82 commit 6fc16b8
Showing 1 changed file with 30 additions and 31 deletions.
61 changes: 30 additions & 31 deletions .github/workflows/test_kubernetes.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,38 @@
name: Kubernetes Integration Tests

on: push

jobs:
name: Spin Kind Cluster, Run Postgres, and Expose
on:
push: # Run on pushes to the default branch
branches: [kube_mode_ci]
pull_request_target: # Also run on pull requests originated from forks
branches: [kube_mode_ci]

on:
push:
branches: [ kube_mode_ci ]

jobs:
spin-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Kind
uses: actions/setup-docker@v3
- name: Create Kind Cluster
run: |
kind create cluster
- name: Create PostgreSQL Deployment
run: |
kubectl apply -f postgres-deployment.yaml
- name: Expose PostgreSQL Service
run: |
kubectl apply -f postgres-service.yaml
- name: Port Forward (or Load Balancer Setup)
run: |
kubectl port-forward service/postgres 5432:5432
- name: Test PostgreSQL Connection
run: |
kubectl get pods -o wide
- name: Tear Down Cluster
run: |
kind delete cluster --name my-cluster
jobs:
spin-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Kind
uses: actions/setup-docker@v3
- name: Create Kind Cluster
run: |
kind create cluster
- name: Create PostgreSQL Deployment
run: |
kubectl apply -f postgres-deployment.yaml
- name: Expose PostgreSQL Service
run: |
kubectl apply -f postgres-service.yaml
- name: Port Forward (or Load Balancer Setup)
run: |
kubectl port-forward service/postgres 5432:5432
- name: Test PostgreSQL Connection
run: |
kubectl get pods -o wide
- name: Tear Down Cluster
run: |
kind delete cluster --name my-cluster
# run-kubernets-tests:
# runs-on: ubuntu-latest
# steps:
Expand Down

0 comments on commit 6fc16b8

Please sign in to comment.