Skip to content

Run Testkube Tests

Run Testkube Tests #7

Workflow file for this run

name: Run Testkube Tests
on:
workflow_dispatch:
# push:
# paths:
# - 'src/**'
# branches:
# - main
env:
GKE_CLUSTER_NAME: ${{ secrets.GKE_CLUSTER_NAME }} # Add your cluster name here.
GKE_ZONE: ${{ secrets.GKE_ZONE }} # Add your cluster zone here.
jobs:
test:
permissions:
contents: 'read'
id-token: 'write'
name: Run Testkube
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
# Authenticate with Google Cloud so we can deploy to the cluster
- id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
project_id: ${{ secrets.GKE_PROJECT }}
credentials_json: '${{ secrets.GKE_SA_KEY }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
# Configure Docker to use the gcloud command-line tool as a credential
# helper for authentication
- run: |-
gcloud --quiet auth configure-docker
# Get the GKE credentials so we can deploy to the cluster
- uses: 'google-github-actions/get-gke-credentials@v2'
with:
cluster_name: ${{ env.GKE_CLUSTER_NAME }}
location: ${{ env.GKE_ZONE }}
# Run Testkube test on a GKE cluster
- uses: kubeshop/setup-testkube@v1
- run: |
testkube run testworkflow gradle-test -f