E2E tests #16
This file contains 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: E2E tests | |
on: | |
schedule: | |
# every work day at 00:00 UTC | |
- cron: 0 0 * * 1-5 | |
workflow_dispatch: | |
inputs: | |
target: | |
description: 'Target branch to run E2E tests over' | |
required: true | |
default: 'main' | |
permissions: | |
checks: write | |
jobs: | |
run-in-k8s: | |
name: Run in Kubernetes latest (${{ github.event.inputs.target || 'main' }}) | |
environment: E2E | |
runs-on: | |
- self-hosted | |
- operator-e2e | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Run e2e test | |
uses: ./.github/actions/run-e2e | |
with: | |
flc-namespace: dto-daily | |
flc-environment: dto-k8s-latest-flc | |
target-branch: ${{ github.event.inputs.target }} | |
tenant1-name: ${{ secrets.TENANT1_NAME }} | |
tenant1-apitoken: ${{ secrets.TENANT1_APITOKEN }} | |
tenant1-oauth-client-id: ${{ secrets.TENANT1_OAUTH_CLIENT_ID }} | |
tenant1-oauth-secret: ${{ secrets.TENANT1_OAUTH_SECRET }} | |
tenant1-oauth-urn: ${{ secrets.TENANT1_OAUTH_URN }} | |
tenant2-name: ${{ secrets.TENANT2_NAME }} | |
tenant2-apitoken: ${{ secrets.TENANT2_APITOKEN }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
run-in-ocp: | |
name: Run in OpenShift latest (${{ github.event.inputs.target || 'main' }}) | |
environment: E2E | |
runs-on: | |
- self-hosted | |
- operator-e2e | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Run e2e test | |
uses: ./.github/actions/run-e2e | |
with: | |
flc-namespace: dto-daily | |
flc-environment: dto-ocp-latest-flc | |
target-branch: ${{ github.event.inputs.target }} | |
tenant1-name: ${{ secrets.TENANT1_NAME }} | |
tenant1-apitoken: ${{ secrets.TENANT1_APITOKEN }} | |
tenant1-oauth-client-id: ${{ secrets.TENANT1_OAUTH_CLIENT_ID }} | |
tenant1-oauth-secret: ${{ secrets.TENANT1_OAUTH_SECRET }} | |
tenant1-oauth-urn: ${{ secrets.TENANT1_OAUTH_URN }} | |
tenant2-name: ${{ secrets.TENANT2_NAME }} | |
tenant2-apitoken: ${{ secrets.TENANT2_APITOKEN }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
notify-slack: | |
name: Notify test results in Slack | |
environment: E2E | |
needs: [ "run-in-k8s", "run-in-ocp" ] | |
runs-on: ubuntu-latest | |
if: ${{ always() }} | |
steps: | |
- name: Notify failure in Slack | |
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 | |
with: | |
webhook: ${{ secrets.SLACK_WEBHOOK_URL }} | |
webhook-type: webhook-trigger | |
payload-templated: true | |
payload: | | |
"message": "tests ${{needs.run-in-k8s.result == 'success' && 'passed :green_heavy_check_mark:' || 'failed :red_circle:'}} on kubernetes :kubernetes:\ntests ${{needs.run-in-ocp.result == 'success' && 'passed :green_heavy_check_mark:' || 'failed :red_circle:'}} on openshift :openshift:\n using ${{ github.event.inputs.target || 'main' }} branch (${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" | |
"run_id": "${{ github.run_id }}" |