all tests #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: all tests | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
jobs: | |
testRunner: | |
name: ${{ matrix.testMode }} tests | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
testMode: | |
- EditMode | |
- PlayMode | |
unityVersion: | |
- 2020.3.48f1 | |
- 2022.3.22f1 | |
- 2023.2.15f1 | |
- 6000.0.22f1 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- 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@v4 | |
id: lfs-cache | |
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@v4 | |
with: | |
path: Library | |
key: Library-test-project-${{ matrix.targetPlatform }}-${{ matrix.unityVersion }} | |
restore-keys: | | |
Library-test-project- | |
Library- | |
- name: Run tests | |
uses: game-ci/unity-test-runner@v4 | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
with: | |
githubToken: ${{ secrets.GITHUB_TOKEN }} | |
artifactsPath: ${{ matrix.testMode }}-artifacts | |
unityVersion: ${{ matrix.unityVersion }} |