Skip to content

Commit

Permalink
Merge pull request #119 from arimger/feature/test-workflow
Browse files Browse the repository at this point in the history
Force standalone tests in the test.yml workflow
  • Loading branch information
arimger authored Aug 30, 2024
2 parents f5435d4 + ef75379 commit e1d3b74
Showing 1 changed file with 23 additions and 30 deletions.
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 }}

0 comments on commit e1d3b74

Please sign in to comment.