Skip to content

Commit

Permalink
feat: add test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
rYuuk committed Aug 31, 2023
1 parent 45770f4 commit 206a81b
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/test-runner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Run Tests

on:
pull_request:
types: [ opened, reopened ]
workflow_dispatch:

jobs:
runAllTests:
name: ${{ matrix.unityVersion }} ${{ matrix.testMode }} tests
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
testMode:
- playmode
- editmode
unityVersion:
- 2020.3.0f1
steps:
- name: Checkout Unity-SDK Repository
uses: actions/checkout@v3
- name: Cache Project
uses: actions/cache@v3
with:
path: Library
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
Library-
- name: Get npm
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install openupm-cli
run: npm install -g openupm-cli
- run: pwd
- name: Add core as package
run: openupm add com.readyplayerme.core
- name: Run Tests
uses: game-ci/unity-test-runner@v2
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
with:
unityVersion: ${{ matrix.unityVersion }}
testMode: ${{ matrix.testMode }}
projectPath: ${{ matrix.projectPath }}
checkName: ${{ matrix.unityVersion }} ${{ matrix.testMode }} tests result
githubToken: ${{ secrets.GITHUB_TOKEN }}
coverageOptions: "generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:+my.assembly.*"

0 comments on commit 206a81b

Please sign in to comment.