fix: node22 image building and testing #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: integration tests | ||
on: | ||
workflow_call: | ||
inputs: | ||
image: | ||
description: 'The image to test' | ||
required: true | ||
type: string | ||
trigger_btp: | ||
description: 'Trigger BTP integration test' | ||
required: false | ||
type: boolean | ||
default: false | ||
jobs: | ||
operator-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 components/operator deploy | ||
make -C tests/operator test | ||
env: | ||
IMG: ${{ inputs.image }} | ||
- if: ${{ always() }} | ||
uses: ./.github/actions/collect-cluster-info | ||
serverless-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 install-serverless-custom-operator | ||
make -C tests/serverless serverless-integration serverless-contract-tests | ||
make remove-serverless | ||
env: | ||
IMG: ${{ inputs.image }} | ||
: | ||
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 tests | ||
run: | | ||
make install-serverless-custom-operator | ||
make -C tests/serverless git-auth-integration | ||
make remove-serverless | ||
env: | ||
APP_TEST_GITHUB_SSH_AUTH_KEY: ${{ secrets.GIT_AUTH_TEST_GITHUB_SSH_KEY }} | ||
APP_TEST_AZURE_BASIC_AUTH_USERNAME: ${{ secrets.GIT_AUTH_TEST_AZURE_USERNAME }} | ||
APP_TEST_AZURE_BASIC_AUTH_PASSWORD: ${{ secrets.GIT_AUTH_TEST_AZURE_PASSWORD }} | ||
IMG: ${{ inputs.image }} | ||
btp-integration-test: | ||
if: ${{ inputs.trigger_btp }} | ||
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 | ||
- 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@6af78799edd07b5301494de20aaecee28f51af27 | ||
id: create-btp-resources | ||
with: | ||
btp_subaccount_name: serverless-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 }}' | ||
btp_kyma_modules: "[]" | ||
btp_kyma_autoscaler_min: 4 | ||
- name: run tests | ||
run: | | ||
make install-serverless-custom-operator | ||
make -C tests/serverless serverless-integration | ||
kubectl delete functions.serverless.kyma-project.io -A --all | ||
make -C tests/serverless git-auth-integration | ||
kubectl delete functions.serverless.kyma-project.io -A --all | ||
env: | ||
IMG: ${{ inputs.image }} | ||
APP_TEST_GITHUB_SSH_AUTH_KEY: ${{ secrets.GIT_AUTH_TEST_GITHUB_SSH_KEY }} | ||
APP_TEST_AZURE_BASIC_AUTH_USERNAME: ${{ secrets.GIT_AUTH_TEST_AZURE_USERNAME }} | ||
APP_TEST_AZURE_BASIC_AUTH_PASSWORD: ${{ secrets.GIT_AUTH_TEST_AZURE_PASSWORD }} | ||
- uses: kyma-project/terraform-module/.github/actions/force-delete-sap-btp-subaccount@6af78799edd07b5301494de20aaecee28f51af27 | ||
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 }} | ||