Skip to content

Commit

Permalink
split verification test workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
anoipm committed May 8, 2024
1 parent 96d3ad5 commit c374c17
Show file tree
Hide file tree
Showing 8 changed files with 142 additions and 142 deletions.
9 changes: 9 additions & 0 deletions .github/actions/collect-cluster-info/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: 'Collect cluster-info'
description: 'Action for collecting cluster-info'

runs:
using: 'composite'
steps:
- name: collect cluster-info
if: ${{ always() }}
run: make -C tests/operator cluster-info
8 changes: 4 additions & 4 deletions .github/workflows/pull-verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ on:
- converted_to_draft

jobs:
call-operator-verify:
uses: ./.github/workflows/operator-verify.yaml
call-unit-tests:
uses: ./.github/workflows/pull-verify/unit-tests.yaml

call-serverless-verify:
uses: ./.github/workflows/serverless-verify.yaml
call-integration-tests:
uses: ./.github/workflows/pull-verify/integration-tests.yaml
34 changes: 34 additions & 0 deletions .github/workflows/pull-verify/integration-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Integration tests

on: [ workflow_call ]

jobs:
pull-operator-integration-test:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-go
- uses: ./.github/actions/create-single-cluster
- name: run integration test
run: |
make -C components/operator deploy
make -C tests/operator test
env:
IMG: europe-docker.pkg.dev/kyma-project/dev/serverless-operator:PR-${{ github.event.number }}
- uses: ./.github/actions/collect-cluster-info

pull-serverless-integration-test:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-go
- uses: ./.github/actions/create-single-cluster
- name: run integration test
run: |
make install-serverless-custom-operator
make -C tests/serverless serverless-integration serverless-contract-tests
make remove-serverless
env:
IMG: europe-docker.pkg.dev/kyma-project/dev/serverless-operator:PR-${{ github.event.number }}
22 changes: 22 additions & 0 deletions .github/workflows/pull-verify/unit-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Unit tests

on: [ workflow_call ]

jobs:
operator-unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-go
- name: run test
run: make -C components/operator test

serverless-unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-go
- uses: ./.github/actions/setup-libgit2
- name: run test
run: make -C components/serverless test

20 changes: 4 additions & 16 deletions .github/workflows/push-verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,8 @@ on:
branches: [ "main", "release-*" ]

jobs:
call-push-operator-integration-test:
uses: ./.github/workflows/operator-verify.yaml@push-operator-integration-test
call-integration-tests:
uses: ./.github/workflows/push-verify/integration-tests.yaml

call-push-operator-upgrade-test:
uses: ./.github/workflows/operator-verify.yaml@push-operator-upgrade-test

call-push-gardener-integration-test:
uses: ./.github/workflows/operator-verify.yaml@push-gardener-integration-test

call-push-serverless-integration-test:
uses: ./.github/workflows/serverless-verify.yaml@push-serverless-integration-test

call-push-git-auth-integration-test:
uses: ./.github/workflows/serverless-verify.yaml@push-git-auth-integration-test

call-push-serverless-upgrade-test:
uses: ./.github/workflows/serverless-verify.yaml@push-serverless-upgrade-test
call-upgrade-tests:
uses: ./.github/workflows/push-verify/upgrade-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,67 +1,22 @@
name: Operator verify
name: Integration tests

on: [ workflow_call ]

jobs:
pull-operator-unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-go
- name: run test
run: make -C components/operator test

pull-operator-integration-test:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-go
- uses: ./.github/actions/create-single-cluster
- name: run integration test (pre)
run: |
make -C components/operator deploy
make -C tests/operator test
env:
IMG: europe-docker.pkg.dev/kyma-project/dev/serverless-operator:PR-${{ github.event.number }}
- name: collect cluster-info
if: ${{ always() }}
run: make -C tests/operator cluster-info

push-operator-integration-test:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-go
- uses: ./.github/actions/create-single-cluster
- name: run integration test (post)
- name: run integration test
run: |
make -C components/operator deploy
make -C tests/operator test
env:
IMG: europe-docker.pkg.dev/kyma-project/prod/serverless-operator:${{ github.sha }}
- name: collect cluster-info
if: ${{ always() }}
run: make -C tests/operator cluster-info

push-operator-upgrade-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-go
- uses: ./.github/actions/create-single-cluster
- name: upgrade test
run: |
make -C components/operator deploy-release
make -C tests/operator test
make -C components/operator deploy
make -C tests/operator test
env:
IMG: europe-docker.pkg.dev/kyma-project/prod/serverless-operator:${{ github.sha }}
- name: collect cluster-info
if: ${{ always() }}
run: make -C tests/operator cluster-info
- uses: ./.github/actions/collect-cluster-info

push-gardener-integration-test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -90,3 +45,35 @@ jobs:
run: make -C hack deprovision-gardener
env:
GARDENER_SA_PATH: /tmp/gardener-sa.yaml

push-serverless-integration-test:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-go
- uses: ./.github/actions/create-single-cluster
- name: run integration test
run: |
make install-serverless-custom-operator
make -C tests/serverless serverless-integration serverless-contract-tests
make remove-serverless
env:
IMG: europe-docker.pkg.dev/kyma-project/prod/serverless-operator:${{ github.sha }}

push-git-auth-integration-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-go
- uses: ./.github/actions/create-single-cluster
- name: run git auth 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: europe-docker.pkg.dev/kyma-project/prod/serverless-operator:${{ github.sha }}
34 changes: 34 additions & 0 deletions .github/workflows/push-verify/upgrade-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Upgrade tests

on: [ workflow_call ]

jobs:
push-operator-upgrade-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-go
- uses: ./.github/actions/create-single-cluster
- name: upgrade test
run: |
make -C components/operator deploy-release
make -C tests/operator test
make -C components/operator deploy
make -C tests/operator test
env:
IMG: europe-docker.pkg.dev/kyma-project/prod/serverless-operator:${{ github.sha }}
- uses: ./.github/actions/collect-cluster-info

push-serverless-upgrade-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-go
- uses: ./.github/actions/create-single-cluster
- name: upgrade test
run: |
make install-serverless-latest-release install-serverless-custom-operator
make -C tests/serverless serverless-integration serverless-contract-tests
make remove-serverless
env:
IMG: europe-docker.pkg.dev/kyma-project/prod/serverless-operator:${{ github.sha }}
74 changes: 0 additions & 74 deletions .github/workflows/serverless-verify.yaml

This file was deleted.

0 comments on commit c374c17

Please sign in to comment.