name: Cloud Runner - K8s Tests on: push: { branches: [remote-builder/k8s, remote-builder/unified-providers] } # push: { branches: [main] } # pull_request: # paths-ignore: # - '.github/**' env: GKE_ZONE: 'us-central1' GKE_REGION: 'us-central1' GKE_PROJECT: 'unitykubernetesbuilder' GKE_CLUSTER: 'unity-builder-cluster' UNITY_LICENSE: "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \nm0Db8UK+ktnOLJBtHybkfetpcKo=o/pUbSQAukz7+ZYAWhnA0AJbIlyyCPL7bKVEM2lVqbrXt7cyey+umkCXamuOgsWPVUKBMkXtMH8L\n5etLmD0getWIhTGhzOnDCk+gtIPfL4jMo9tkEuOCROQAXCci23VFscKcrkB+3X6h4wEOtA2APhOY\nB+wvC794o8/82ffjP79aVAi57rp3Wmzx+9pe9yMwoJuljAy2sc2tIMgdQGWVmOGBpQm3JqsidyzI\nJWG2kjnc7pDXK9pwYzXoKiqUqqrut90d+kQqRyv7MSZXR50HFqD/LI69h68b7P8Bjo3bPXOhNXGR\n9YCoemH6EkfCJxp2gIjzjWW+l2Hj2EsFQi8YXw==" jobs: k8sBuilds: name: K8s (GKE Autopilot) build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: targetPlatform: - StandaloneLinux64 - StandaloneWindows64 steps: ########################### # Checkout # ########################### - uses: actions/checkout@v2 if: github.event.event_type != 'pull_request_target' with: lfs: true ########################### # Setup # ########################### - uses: google-github-actions/setup-gcloud@master with: version: '288.0.0' service_account_email: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_EMAIL }} service_account_key: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }} - name: Get GKE cluster credentials run: gcloud container clusters get-credentials $GKE_CLUSTER --zone $GKE_ZONE --project $GKE_PROJECT ########################### # Cloud Runner Test Suite # ########################### - uses: actions/setup-node@v2 with: node-version: 12.x - run: yarn - run: yarn run cli --help - name: Cloud Runner Test Suite run: yarn run test-i-k8s env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} DEBUG: true PROJECT_PATH: ${{ matrix.projectPath }} UNITY_VERSION: ${{ matrix.unityVersion }} TARGET_PLATFORM: ${{ matrix.targetPlatform }} GITHUUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} KUBE_CONFIG: ${{ steps.read-base64.outputs.base64 }} CLOUD_RUNNER_BRANCH: remote-builder/unified-providers ########################### # Cloud Runner Build Test # ########################### - name: Cloud Runner Build Test uses: ./ id: k8s-unity-build env: CloudRunnerBranch: remote-builder/unified-providers DEBUG: true with: cloudRunnerCluster: k8s UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} targetPlatform: ${{ matrix.targetPlatform }} kubeConfig: ${{ steps.read-base64.outputs.base64 }} githubToken: ${{ secrets.GITHUB_TOKEN }} projectPath: test-project unityVersion: 2019.3.15f1 versioning: None cloudRunnerTests: true ########################### # Upload # ########################### # download from cloud storage - uses: actions/upload-artifact@v2 with: name: Kubernetes Build (${{ matrix.targetPlatform }}) path: k8s-volume-download retention-days: 14