Skip to content

Unity tests

Unity tests #14

Workflow file for this run

name: Unity tests
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
test:
name: Edit-mode tests
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
- name: Cache Unity Library
uses: actions/cache@v4
with:
path: Tests/UnityProject/Library
key: Library-${{ runner.os }}-2022.3
restore-keys: |
Library-${{ runner.os }}-
- name: Run edit-mode tests
uses: game-ci/unity-test-runner@v4
env:
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
projectPath: Tests/UnityProject
unityVersion: 2022.3.40f1
testMode: editmode
artifactsPath: test-results
githubToken: ${{ secrets.GITHUB_TOKEN }}
checkName: Edit-mode test results
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: test-results