From 0eea1b6d1641910f0c137e4c6b175eff692c36b7 Mon Sep 17 00:00:00 2001 From: Jon Manning Date: Thu, 14 Mar 2024 17:55:51 +1100 Subject: [PATCH] Update cleanup script and remove max parallel --- .github/workflows/test_sh.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_sh.yml b/.github/workflows/test_sh.yml index 8c357fa1..45bfa865 100644 --- a/.github/workflows/test_sh.yml +++ b/.github/workflows/test_sh.yml @@ -19,7 +19,7 @@ jobs: runs-on: self-hosted strategy: fail-fast: false - max-parallel: 1 # Only run one at a time, to prevent license contention + # max-parallel: 1 # Only run one at a time, to prevent license contention matrix: projectPath: - YarnSpinner @@ -77,13 +77,24 @@ jobs: -v ./output:/output \ --hostname YS-Linux-Build \ yarnspinner/unity-${{ matrix.unityVersion }} \ - /bin/bash -c 'unity-editor -runTests -batchmode -projectPath /project/ -testResults /output/TestResults-EditMode.xml -testPlatform EditMode -logFile -; chmod -R 777 /project/ /output/' - + /bin/bash -c 'unity-editor -runTests -batchmode -projectPath /project/ -testResults /output/TestResults-EditMode.xml -testPlatform EditMode -logFile -' + - name: Upload test results uses: actions/upload-artifact@v2 if: always() with: - name: Test results (edit + play, ${{ matrix.unityVersion }}-${{ matrix.targetPlatform }} - # path: ${{ steps.testRunner.outputs.artifactsPath }} - path: ./output + name: Test results (edit + play, ${{ matrix.unityVersion }}-${{ matrix.targetPlatform }} + # path: ${{ steps.testRunner.outputs.artifactsPath }} + path: ./output + + - name: Cleanup + if: always() + run: | + docker run \ + --run \ + -v ./${{ matrix.projectPath }}:/project + -v ./output:/output + yarnspinner/unity-${{ matrix.unityVersion }} \ + /bin/bash -c 'rm -rf /project/* /output/*' +