generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 18
60 lines (55 loc) · 2.4 KB
/
_integration-tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: integration tests
on:
workflow_call:
inputs:
image:
description: 'The image to test'
required: true
type: string
jobs:
integration-test:
if: ${{ !startsWith(github.event_name, 'pull_request') || github.event.pull_request.draft == false }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- uses: ./.github/actions/setup-go
- uses: ./.github/actions/create-k3d-cluster
- name: run test
run: make -C hack/ci integration-test-on-cluster
env:
IMG: ${{ inputs.image }}
btp-integration-tests:
if: ${{ !startsWith(github.event_name, 'pull_request') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: compute github commit sha
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- uses: kyma-project/terraform-module/.github/actions/create-sap-btp-kyma@2edb264e0f701fc93af4fb35eaeb7b8b3c05e493
id: create-btp-resources
with:
btp_subaccount_name: keda-test-${{ steps.vars.outputs.sha_short }}-${{ github.run_attempt }}
btp_backend_url: '${{ secrets.BTP_BACKEND_URL}}'
btp_user: '${{ secrets.BTP_BOT_USER}}'
btp_password: '${{ secrets.BTP_BOT_PASSWORD}}'
btp_global_account: '${{ secrets.BTP_GLOBAL_ACCOUNT }}'
btp_idp_tenant: '${{ secrets.BTP_CUSTOM_IAS_TENANT }}'
btp_subaccount_region: '${{ secrets.BTP_SUBACCOUNT_REGION }}'
btp_kyma_region: '${{ secrets.BTP_KYMA_REGION }}'
btp_kyma_plan: '${{ secrets.BTP_KYMA_PLAN }}'
- name: Run Keda Manager's integration test
run: |
KUBECONFIG=${KUBECONFIG} make -C hack/ci integration-test-on-cluster
- uses: kyma-project/terraform-module/.github/actions/force-delete-sap-btp-subaccount@2edb264e0f701fc93af4fb35eaeb7b8b3c05e493
if: always()
with:
btp_subaccount_id: ${{ steps.create-btp-resources.outputs.subaccount_id }}
btp_backend_url: ${{ secrets.BTP_BACKEND_URL}}
btp_user: ${{ secrets.BTP_BOT_USER}}
btp_password: ${{ secrets.BTP_BOT_PASSWORD}}
btp_global_account: ${{ secrets.BTP_GLOBAL_ACCOUNT }}
btp_idp_tenant: ${{ secrets.BTP_CUSTOM_IAS_TENANT }}