Skip to content

Feature: v3

Feature: v3 #393

Workflow file for this run

name: Test project
on:
push:
branches:
- master
pull_request_target:
branches:
- master
jobs:
authorize:
environment:
${{ github.event_name == 'pull_request_target' &&
github.event.pull_request.head.repo.full_name != github.repository &&
'external' || 'internal' }}
runs-on: ubuntu-latest
steps:
- run: true
testAllModes:
name: Test in ${{ matrix.testMode }}
needs: authorize
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
projectPath:
- Demo
testMode:
# - playmode
- editmode
steps:
- uses: actions/checkout@v3
with:
lfs: false
ref: ${{ github.event.pull_request.head.sha || github.ref }}
# - uses: actions/cache@v3
# with:
# path: ${{ matrix.projectPath }}/Library
# key: Library-${{ matrix.projectPath }}
# restore-keys: |
# Library-
- uses: game-ci/unity-test-runner@v3
id: tests
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
projectPath: ${{ matrix.projectPath }}
testMode: ${{ matrix.testMode }}
artifactsPath: ${{ matrix.testMode }}-artifacts
githubToken: ${{ secrets.GITHUB_TOKEN }}
checkName: ${{ matrix.testMode }} Test Results
# coverageOptions: 'generateAdditionalMetrics;generateHtmlReport;generateBadgeReport'
- uses: actions/upload-artifact@v3
if: always()
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 }}