From a473f98c8c4872bd3857bbbabf97dc0acd5c5798 Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Tue, 6 Feb 2024 14:29:36 +0100 Subject: [PATCH] Divide workflow into two separated actions --- .github/workflows/{main.yml => build.yml} | 19 +--------- .github/workflows/test.yml | 43 +++++++++++++++++++++++ 2 files changed, 44 insertions(+), 18 deletions(-) rename .github/workflows/{main.yml => build.yml} (65%) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/main.yml b/.github/workflows/build.yml similarity index 65% rename from .github/workflows/main.yml rename to .github/workflows/build.yml index 731c212d..23ef7438 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Test package +name: Build package on: [push, pull_request] @@ -9,15 +9,11 @@ jobs: strategy: fail-fast: false matrix: - testMode: - - playmode - # - editmode projectPath: - test-package unityVersion: - 2022.3.19f1 - 2019.4.40f1 - - 2020.3.48f1 targetPlatform: - StandaloneOSX - StandaloneWindows @@ -37,19 +33,6 @@ jobs: mkdir ${{ matrix.projectPath }} mv Editor Runtime Tests Android iOS Windows package.json ${{ matrix.projectPath }}/ - - name: Run Tests - uses: game-ci/unity-test-runner@v4.0.0 - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - with: - packageMode: true - projectPath: ${{ matrix.projectPath }}/ - testMode: ${{ matrix.testMode }} - unityVersion: ${{ matrix.unityVersion }} - coverageOptions: "generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:+my.assembly.*" - - if: matrix.targetPlatform == 'Android' uses: jlumbroso/free-disk-space@v1.3.1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..dd4c9811 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,43 @@ +name: Test package + +on: [push, pull_request] + +jobs: + test: + name: Run Tests in ${{ matrix.testMode }} ${{ matrix.unityVersion }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + testMode: + - playmode + # - editmode + projectPath: + - test-package + unityVersion: + - 2022.3.19f1 + - 2019.4.40f1 + - 2020.3.48f1 + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + + - name: Setup Environment + run: | + mkdir ${{ matrix.projectPath }} + mv Editor Runtime Tests Android iOS Windows package.json ${{ matrix.projectPath }}/ + + - name: Run Tests + uses: game-ci/unity-test-runner@v4.0.0 + env: + UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} + UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} + with: + packageMode: true + projectPath: ${{ matrix.projectPath }}/ + testMode: ${{ matrix.testMode }} + unityVersion: ${{ matrix.unityVersion }} + coverageOptions: "generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:+my.assembly.*" \ No newline at end of file