From 4c493affdaad7c365ad7fb98943f03b481719597 Mon Sep 17 00:00:00 2001 From: William Yang Date: Wed, 2 Nov 2022 14:36:08 +0100 Subject: [PATCH] ci: make test runnable without self-hosted in fork repo --- .github/workflows/run_emqx_app_tests.yaml | 12 +++++++- .github/workflows/run_test_cases.yaml | 37 +++++++++++++++++++++-- 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run_emqx_app_tests.yaml b/.github/workflows/run_emqx_app_tests.yaml index 5b68e3dda..15fb4a3c1 100644 --- a/.github/workflows/run_emqx_app_tests.yaml +++ b/.github/workflows/run_emqx_app_tests.yaml @@ -22,8 +22,18 @@ jobs: - ubuntu20.04 arch: - amd64 + runs-on: + - aws-amd64 + - ubuntu-20.04 + use-self-hosted: + - ${{ github.repository_owner == 'emqx' }} + exclude: + - runs-on: ubuntu-20.04 + use-self-hosted: true + - runs-on: aws-amd64 + use-self-hosted: false - runs-on: aws-amd64 + runs-on: ${{ matrix.runs-on }} container: "ghcr.io/emqx/emqx-builder/5.0-18:${{ matrix.elixir}}-${{ matrix.otp }}-${{ matrix.os }}" defaults: diff --git a/.github/workflows/run_test_cases.yaml b/.github/workflows/run_test_cases.yaml index f35a7156e..c92f5aadc 100644 --- a/.github/workflows/run_test_cases.yaml +++ b/.github/workflows/run_test_cases.yaml @@ -50,13 +50,24 @@ jobs: eunit_and_proper: needs: prepare - runs-on: aws-amd64 + runs-on: ${{ matrix.runs-on }} strategy: fail-fast: false matrix: profile: - emqx - emqx-enterprise + runs-on: + - aws-amd64 + - ubuntu-20.04 + use-self-hosted: + - ${{ github.repository_owner == 'emqx' }} + exclude: + - runs-on: ubuntu-20.04 + use-self-hosted: true + - runs-on: aws-amd64 + use-self-hosted: false + defaults: run: shell: bash @@ -97,8 +108,18 @@ jobs: fail-fast: false matrix: app_name: ${{ fromJson(needs.prepare.outputs.docker_ct_apps) }} + runs-on: + - aws-amd64 + - ubuntu-20.04 + use-self-hosted: + - ${{ github.repository_owner == 'emqx' }} + exclude: + - runs-on: ubuntu-20.04 + use-self-hosted: true + - runs-on: aws-amd64 + use-self-hosted: false - runs-on: aws-amd64 + runs-on: ${{ matrix.runs-on }} defaults: run: shell: bash @@ -140,8 +161,18 @@ jobs: profile: - emqx - emqx-enterprise + runs-on: + - aws-amd64 + - ubuntu-20.04 + use-self-hosted: + - ${{ github.repository_owner == 'emqx' }} + exclude: + - runs-on: ubuntu-20.04 + use-self-hosted: true + - runs-on: aws-amd64 + use-self-hosted: false - runs-on: aws-amd64 + runs-on: ${{ matrix.runs-on }} container: "ghcr.io/emqx/emqx-builder/5.0-18:1.13.4-24.3.4.2-1-ubuntu20.04" defaults: run: