From 0ffa28cabe2fce9146dc0ab15918239909122157 Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 22 Aug 2023 03:16:40 -0700 Subject: [PATCH] changed actions to test and build tests in the same job --- .github/workflows/main.yml | 76 +++++--------------------- .github/workflows/main_combined.yml | 85 ----------------------------- 2 files changed, 13 insertions(+), 148 deletions(-) delete mode 100644 .github/workflows/main_combined.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b34d54c6f..52327ae52 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,15 +4,15 @@ on: [push, pull_request, workflow_dispatch] jobs: - Tests: - name: Test-${{ matrix.testMode }}-${{ matrix.unityVersion }} + Builds: + name: Build-${{ matrix.targetPlatform }}-${{ matrix.unityVersion }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: - testMode: - #- playmode - - editmode + targetPlatform: + - StandaloneWindows + #- WebGL unityVersion: - 2019.3.15f1 - 2019.4.40f1 @@ -26,19 +26,15 @@ jobs: - 2022.2.21f1 - 2022.3.7f1 - 2023.1.0f1 - + steps: - #Checkout - uses: actions/checkout@v3.5.3 with: + fetch-depth: 0 lfs: true - - #CreateSymbolicLink: - #- name: CreateSymbolicLink - #run: Assets/CreateSymbolicLink.sh - + #Cache - uses: actions/cache@v1.2.1 with: @@ -47,8 +43,8 @@ jobs: restore-keys: Library-${{ matrix.projectPath }}-${{ matrix.unityVersion }} Library- - - #Test Runner + + #Test - uses: game-ci/unity-test-runner@v2.2.0 id: tests env: @@ -61,59 +57,13 @@ jobs: checkName: Test results ${{ matrix.testMode }}-${{ matrix.unityVersion }} unityVersion: ${{ matrix.unityVersion }} customParameters: '-nographics' - - #Artifact + + #Test Artifact - uses: actions/upload-artifact@v3.1.2 if: always() with: name: Test results for ${{ matrix.testMode }}-${{ matrix.unityVersion }} path: ${{ steps.tests.outputs.artifactsPath }} - - #BUILD - Builds: - name: Build-${{ matrix.targetPlatform }}-${{ matrix.unityVersion }} - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - targetPlatform: - - StandaloneWindows - #- WebGL - unityVersion: - - 2019.3.15f1 - - 2019.4.40f1 - - 2020.1.17f1 - - 2020.2.7f1 - - 2020.3.48f1 - - 2021.1.28f1 - - 2021.2.19f1 - - 2021.3.29f1 - - 2022.1.24f1 - - 2022.2.21f1 - - 2022.3.7f1 - - 2023.1.0f1 - - steps: - - #Checkout - - uses: actions/checkout@v3.5.3 - with: - fetch-depth: 0 - lfs: true - - - #CreateSymbolicLink: - #- name: CreateSymbolicLink - #run: Assets/CreateSymbolicLink.sh - - #Cache - - uses: actions/cache@v1.2.1 - with: - path: Library - key: Library-${{ matrix.projectPath }}-${{ matrix.unityVersion }} - restore-keys: - Library-${{ matrix.projectPath }}-${{ matrix.unityVersion }} - Library- #Build - uses: game-ci/unity-builder@v3.0.0 @@ -124,7 +74,7 @@ jobs: unityVersion: ${{ matrix.unityVersion }} customParameters: '-nographics' - #Artifact + #Build Artifact - uses: actions/upload-artifact@v3.1.2 with: name: Build-${{ matrix.targetPlatform }}-${{ matrix.unityVersion }} diff --git a/.github/workflows/main_combined.yml b/.github/workflows/main_combined.yml deleted file mode 100644 index 246631c61..000000000 --- a/.github/workflows/main_combined.yml +++ /dev/null @@ -1,85 +0,0 @@ -name: TEST & BUILD - -on: [workflow_dispatch] - -jobs: - #TEST & BUILD - TestAndBuild: - name: TestAndBuild-${{ matrix.targetPlatform }}-${{ matrix.unityVersion }} - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - targetPlatform: - - StandaloneWindows - #- WebGL - unityVersion: - - 2019.3.15f1 - - 2019.4.40f1 - - 2020.1.17f1 - - 2020.2.7f1 - - 2020.3.48f1 - - 2021.1.28f1 - - 2021.2.19f1 - - 2021.3.29f1 - - 2022.1.24f1 - - 2022.2.21f1 - - 2022.3.7f1 - - 2023.1.0f1 - - steps: - - #Checkout - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - lfs: true - - #CreateSymbolicLink: - - name: CreateSymbolicLink - run: Assets/CreateSymbolicLink.sh - - #Cache - - uses: actions/cache@v2 - with: - path: Library - key: Library-${{ matrix.projectPath }}-${{ matrix.unityVersion }} - restore-keys: - Library-${{ matrix.projectPath }}-${{ matrix.unityVersion }} - Library- - - #Test Runner - - uses: game-ci/unity-test-runner@v2 - id: tests - env: - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - with: - projectPath: ${{ matrix.projectPath }} - testMode: ${{ matrix.testMode }} - artifactsPath: ${{ matrix.testMode }}-artifacts - githubToken: ${{ secrets.GITHUB_TOKEN }} - checkName: Test results ${{ matrix.testMode }}-${{ matrix.unityVersion }} - unityVersion: ${{ matrix.unityVersion }} - customParameters: '-nographics' - - #Test Artifacts - - uses: actions/upload-artifact@v2 - if: always() - with: - name: Test results for ${{ matrix.testMode }}-${{ matrix.unityVersion }} - path: ${{ steps.tests.outputs.artifactsPath }} - - #Build - - uses: game-ci/unity-builder@v2 - env: - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - with: - targetPlatform: ${{ matrix.targetPlatform }} - unityVersion: ${{ matrix.unityVersion }} - customParameters: '-nographics' - - #Build Artifacts - - uses: actions/upload-artifact@v2 - with: - name: Build-${{ matrix.targetPlatform }}-${{ matrix.unityVersion }} - path: build/${{ matrix.targetPlatform }} \ No newline at end of file