Welcome to Testkube - Your friendly cloud-native testing framework for Kubernetes
Website | Documentation | Twitter | Discord | Blog
"Setup Testkube CLI" is a GitHub Action for managing your Testkube installation.
Use it to install Testkube CLI to manage your resources, run tests and test suites, or anything else.
To use the action in your GitHub workflow, use kubeshop/setup-testkube@v1
action.
The configuration options are described in the Inputs section, and may vary depending on the Testkube solution you are using (Pro or self-hosted) and your needs.
To use this GitHub Action for the Testkube Pro, you need to create API token.
Then, pass the organization
and environment
IDs for the test, along with the token
and other parameters specific for your use case:
uses: kubeshop/setup-testkube@v1
with:
# Instance
organization: tkcorg_0123456789abcdef
environment: tkcenv_fedcba9876543210
token: tkcapi_0123456789abcdef0123456789abcd
It will be probably unsafe to keep directly in the workflow's YAML configuration, so you may want to use Github's secrets instead.
uses: kubeshop/setup-testkube@v1
with:
# Instance
organization: ${{ secrets.TkOrganization }}
environment: ${{ secrets.TkEnvironment }}
token: ${{ secrets.TkToken }}
To connect to the self-hosted instance, you need to have kubectl
configured for accessing your Kubernetes cluster, and simply passing optional namespace, if the Testkube is not deployed in the default testkube
namespace, i.e.:
uses: kubeshop/setup-testkube@v1
with:
namespace: custom-testkube
steps:
# Set up Kubectl (AWS EKS)
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AwsAccessKeyId }}
aws-secret-access-key: ${{ secrets.AwsSecretAccessKey }}
aws-region: ${{ secrets.AwsRegion }}
- run: |
aws eks update-kubeconfig --name ${{ secrets.EksClusterName }} --region ${{ secrets.AwsRegion }}
# Setup Testkube
- uses: kubeshop/setup-testkube@v1
# Use CLI with a shell script
- run: |
testkube run test some-test-name -f
steps:
# Setup Testkube
- uses: kubeshop/setup-testkube@v1
with:
organization: ${{ secrets.TkOrganization }}
environment: ${{ secrets.TkEnvironment }}
token: ${{ secrets.TkToken }}
# Use CLI with a shell script
- run: |
testkube run test some-test-name -f
Besides common inputs, there are some different for kubectl and Pro connection.
Required | Name | Description |
---|---|---|
✗ | channel |
Distribution channel to install the latest application from - one of stable or beta (default: stable ) |
✗ | version |
Static Testkube CLI version to force its installation instead of the latest |
Required | Name | Description |
---|---|---|
✗ | namespace |
Set namespace where Testkube is deployed to (default: testkube ) |
Required | Name | Description |
---|---|---|
✓ | organization |
The organization ID from Testkube Pro or Enterprise - it starts with tkc_org , you may find it i.e. in the dashboard's URL |
✓ | environment |
The environment ID from Testkube Pro or Enterprise - it starts with tkc_env , you may find it i.e. in the dashboard's URL |
✓ | token |
API token that has at least a permission to run specific test or test suite. You may read more about creating API token in Testkube Pro or Enterprise |
✗ | url |
URL of the Testkube Enterprise instance, if applicable |
✗ | urlApiSubdomain |
API subdomain the Testkube Enterprise URL, if necessary |
✗ | urlUiSubdomain |
Dashboard subdomain the Testkube Enterprise URL, if necessary |
✗ | urlLogsSubdomain |
Logs Server subdomain the Testkube Enterprise URL, if necessary |