From 3a140669c1f20308e0eeabb47ee7938e23f27733 Mon Sep 17 00:00:00 2001 From: Frostebite Date: Fri, 10 Feb 2023 03:47:56 +0000 Subject: [PATCH] pipeline improvement --- .github/workflows/cloud-runner-pipeline.yml | 47 ++++++++++++++++++++- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cloud-runner-pipeline.yml b/.github/workflows/cloud-runner-pipeline.yml index 5fda40c8..736625be 100644 --- a/.github/workflows/cloud-runner-pipeline.yml +++ b/.github/workflows/cloud-runner-pipeline.yml @@ -35,7 +35,51 @@ env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: - integrationTests: + localIntegrationTests: + name: Integration Tests + if: github.event.event_type != 'pull_request_target' + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + cloudRunnerCluster: + - local-docker + steps: + - name: Checkout (default) + uses: actions/checkout@v2 + with: + lfs: false + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: eu-west-2 + - uses: google-github-actions/auth@v1 + if: matrix.CloudRunnerCluster == 'k8s' + with: + credentials_json: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }} + - name: 'Set up Cloud SDK' + if: matrix.CloudRunnerCluster == 'k8s' + uses: 'google-github-actions/setup-gcloud@v1' + - name: Get GKE cluster credentials + if: matrix.CloudRunnerCluster == 'k8s' + run: | + export USE_GKE_GCLOUD_AUTH_PLUGIN=True + gcloud components install gke-gcloud-auth-plugin + gcloud container clusters get-credentials $GKE_CLUSTER --zone $GKE_ZONE --project $GKE_PROJECT + - run: yarn + - run: yarn run test-i --detectOpenHandles --forceExit --runInBand + timeout-minutes: 180 + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + PROJECT_PATH: test-project + TARGET_PLATFORM: StandaloneWindows64 + cloudRunnerTests: true + versioning: None + CLOUD_RUNNER_CLUSTER: ${{ matrix.cloudRunnerCluster }} + cloudRunnerIntegrationTests: + needs: localIntegrationTests name: Integration Tests if: github.event.event_type != 'pull_request_target' runs-on: ubuntu-latest @@ -44,7 +88,6 @@ jobs: matrix: cloudRunnerCluster: - aws - - local-docker - k8s steps: - name: Checkout (default)