Skip to content
43 changes: 43 additions & 0 deletions .github/workflows/kor-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Kor CI Test

on:
pull_request:
branches: [main]

jobs:
kor-test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23.2'

- name: Set up Kind cluster
uses: helm/kind-action@v1.8.0

- name: Deploy test resources via kubectl commands
run: |
kubectl create deployment nginx --image=nginx --replicas=0
kubectl expose deployment nginx --port=80 --target-port=80
echo "=== Resources created ==="
kubectl get all

- name: Run kor all before deletion
run: |
echo "=== kor output BEFORE delete ==="
go run main.go all

- name: Run kor all --delete
run: |
echo "=== Running kor all --delete ==="
go run main.go all --delete --no-interactive

- name: Run kor all after deletion
run: |
echo "=== kor output AFTER delete ==="
go run main.go all