From 696f3cbd207760db5861101e1a9261cb68aabae1 Mon Sep 17 00:00:00 2001 From: Hyounggyu Choi Date: Mon, 27 Nov 2023 11:42:24 +0100 Subject: [PATCH] tests/e2e: Migrate e2e test for s390x to GHA This PR is to migrate the following e2e tests for s390x to GHA: - confidential-containers-operator-main-ubuntu-20.04-s390x-containerd_kata-qemu-PR - confidential-containers-operator-main-ubuntu-20.04-s390x-containerd_kata-qemu-baseline Fixes: #294 Signed-off-by: Hyounggyu Choi --- .github/workflows/ci-nightly-s390x.yaml | 9 +++++++ .github/workflows/ci-on-push-s390x.yaml | 17 ++++++++++++ .github/workflows/ci-s390x.yaml | 36 +++++++++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 .github/workflows/ci-nightly-s390x.yaml create mode 100644 .github/workflows/ci-on-push-s390x.yaml create mode 100644 .github/workflows/ci-s390x.yaml diff --git a/.github/workflows/ci-nightly-s390x.yaml b/.github/workflows/ci-nightly-s390x.yaml new file mode 100644 index 00000000..a8236f7c --- /dev/null +++ b/.github/workflows/ci-nightly-s390x.yaml @@ -0,0 +1,9 @@ +name: Operator E2E Test Nightly for s390x +on: + schedule: + - cron: '0 5 * * *' + workflow_dispatch: + +jobs: + operator-e2e-nightly: + uses: ./.github/workflows/ci-s390x.yaml diff --git a/.github/workflows/ci-on-push-s390x.yaml b/.github/workflows/ci-on-push-s390x.yaml new file mode 100644 index 00000000..5f5b0885 --- /dev/null +++ b/.github/workflows/ci-on-push-s390x.yaml @@ -0,0 +1,17 @@ +name: Operator E2E Test On-Push for s390x +on: + pull_request_target: + branches: + - 'main' + types: + - opened + - synchronize + - reopened + - labeled + paths-ignore: + - 'docs/**' + +jobs: + operator-e2e-on-push: + if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') }} + uses: ./.github/workflows/ci-s390x.yaml diff --git a/.github/workflows/ci-s390x.yaml b/.github/workflows/ci-s390x.yaml new file mode 100644 index 00000000..81897f16 --- /dev/null +++ b/.github/workflows/ci-s390x.yaml @@ -0,0 +1,36 @@ +name: Operator E2E Test for s390x +on: + workflow_call: + +permissions: + contents: read + +jobs: + operator-e2e: + runs-on: s390x + + strategy: + matrix: + runtimeclass: ["kata-qemu"] + + steps: + - name: Adjust a permission for repo + run: | + sudo chown -R $USER:$USER $GITHUB_WORKSPACE + - uses: actions/checkout@v4 + - name: Take a pre-action for self-hosted runner + run: ${HOME}/script/pre_action.sh cc-operator-pr + - name: Install deps + run: | + sudo apt-get update -y + sudo apt-get install -y ansible python-is-python3 + - name: Run e2e tests + run: | + cd tests/e2e + export PATH="$PATH:/usr/local/bin" + ./run-local.sh -r ${{ matrix.runtimeclass }} + env: + REGISTRY_CREDENTIAL_ENCODED: ${{ secrets.REGISTRY_CREDENTIAL_ENCODED }} + - name: Take a post-action + if: always() + run: ${HOME}/script/post_action.sh cc-operator-pr