Skip to content

Commit

Permalink
ci(garden): πŸ‘· add garden test workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Ruck <git@manuelruck.de>
  • Loading branch information
Manuel Ruck committed Jun 9, 2024
1 parent eeb4af4 commit 2c7e11b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/test-integration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: πŸ§‘β€πŸŒΎ Integration-Test
on:
push:
pull_request:
workflow_dispatch:

jobs:
Test-on-cluster:
runs-on: ubuntu-latest
steps:
- name: πŸš€ Testing on a k8s Kind Cluster
uses: helm/kind-action@v1.10.0
- name: πŸ“œ save the current kube-context config file as environment variable
id: kube-context
run: |
kubectl config view --raw
kubectl config view --raw | base64
echo "kubeconfig=$(kubectl config view --raw | tr '\n' '' | base64)" >> $GITHUB_ENV
- name: πŸ“₯ Checkout code
uses: actions/checkout@v3.0.2
- run: |
cat $HOME/.kube/config
- name: 🌱 Deploy preview env with Garden
uses: garden-io/garden-action@v1.2
with:
command: test
# kubeconfig-location: $HOME/.kube/config
kubeconfig: $(kubectl config view --raw | base64)
- run: |
cat $HOME/.kube/config
1 change: 1 addition & 0 deletions project.garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ environments:
providers:
- name: local-kubernetes
environments: [local, local-prod]
context: ${local.env.KUBE_CONTEXT || "docker-desktop"}

0 comments on commit 2c7e11b

Please sign in to comment.