Skip to content

Merge branch 'release/2.5.0' #5

Merge branch 'release/2.5.0'

Merge branch 'release/2.5.0' #5

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
test:
name: Test in ${{ matrix.testMode }}
runs-on: ubuntu-latest
permissions: write-all
strategy:
fail-fast: false
matrix:
projectPath:
- Unity_ExperimentLibrary
testMode:
- editmode
# - playmode
# - standalone
steps:
# Checkout (without LFS)
- name: Checkout repository
uses: actions/checkout@v4
# Git LFS
- 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@v3
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
# Cache
- uses: actions/cache@v3
with:
path: ${{ matrix.projectPath }}/Library
key:
Library-${{ matrix.projectPath }}-${{ hashFiles('Assets/**', 'Packages/**',
'ProjectSettings/**') }}
restore-keys: |
Library-
# Test
- name: Run tests
id: 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:
projectPath: ${{ matrix.projectPath }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
testMode: ${{ matrix.testMode }}
artifactsPath: ${{ matrix.testMode }}-artifacts
checkName: ${{ matrix.testMode }} Test Results
coverageOptions: "generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:+my.assembly.*"
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: Test results for ${{ matrix.testMode }}
path: ${{ steps.tests.outputs.artifactsPath }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: Coverage results for ${{ matrix.testMode }}
path: ${{ steps.tests.outputs.coveragePath }}