Skip to content

Commit

Permalink
Run integration test on gh action (#162)
Browse files Browse the repository at this point in the history
* Run integration test on gh action

* setup go 1.21
  • Loading branch information
kwiatekus authored Jan 2, 2024
1 parent 439cde5 commit 4158872
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/k3d-verify-warden-manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: k3d integration test

on:
push:
branches: [ "main", "release-*" ]
workflow_dispatch:
pull_request:

jobs:
k3d-integration-test:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Create Single Cluster
uses: AbsaOSS/k3d-action@4e8b3239042be1dc0aed6c5eb80c13b18200fc79 #v2.4.0
with:
cluster-name: "k3dCluster"
args: >-
--agents 1
--port 80:80@loadbalancer
--port 443:443@loadbalancer
--wait
- uses: actions/setup-go@v4
with:
go-version: '1.21'
cache: true
- name: run test
run: make verify-on-cluster
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,11 @@ configure-git-origin:


.PHONY: k3d-integration-test
k3d-integration-test: ## Run integration tests on self-prepared k3d cluster.
k3d-integration-test: run-on-k3d verify-status run-integration-tests

.PHONY: verify-on-cluster
verify-on-cluster: run-on-cluster verify-status run-integration-tests

.PHONY: create-k3d
create-k3d: ## Create k3d
${KYMA} provision k3d --ci -p 6080:8080@loadbalancer -p 6433:8433@loadbalancer
Expand All @@ -140,6 +142,11 @@ create-k3d: ## Create k3d
run-on-k3d: kyma create-k3d configure-git-origin module-build
kubectl apply -f warden-manifest.yaml

.PHONY: run-on-cluster
run-on-cluster: configure-git-origin module-build
kubectl create namespace kyma-system
kubectl apply -f warden-manifest.yaml

.PHONY: verify-status
verify-status:
@./hack/verify_warden_status.sh
Expand Down

0 comments on commit 4158872

Please sign in to comment.