Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force standalone tests in the test.yml workflow #119

Merged
merged 10 commits into from
Aug 30, 2024
53 changes: 23 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,39 @@ on:

env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}

jobs:
testRunner:
name: Test all modes 📝
testAllModes:
name: Test in '${{ matrix.testMode }}' 📝
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
testMode:
- playmode
- editmode
- standalone
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Create LFS file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id

- name: Restore LFS cache
uses: actions/cache@v2
id: lfs-cache
- uses: actions/checkout@v4
with:
path: .git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}

- name: Git LFS Pull
run: |
git lfs pull
git add .
git reset --hard

- name: Restore Library cache
uses: actions/cache@v2
lfs: true
- uses: actions/cache@v3
with:
path: Library
key: Library-test-project
restore-keys: |
Library-test-project-
Library-

- uses: game-ci/unity-test-runner@v2
id: testRunner
- uses: game-ci/unity-test-runner@v4
id: tests
with:
testMode: all

- uses: actions/upload-artifact@v2
testMode: ${{ matrix.testMode }}
artifactsPath: ${{ matrix.testMode }}-artifacts
checkName: ${{ matrix.testMode }} Test Results
- uses: actions/upload-artifact@v3
if: always()
with:
name: Test results (all modes)
path: ${{ steps.testRunner.outputs.artifactsPath }}
name: Test results for ${{ matrix.testMode }}
path: ${{ steps.tests.outputs.artifactsPath }}
Loading