Skip to content

Add E2E testing and CI workflow #12

Add E2E testing and CI workflow

Add E2E testing and CI workflow #12

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
test:
name: CI (${{ matrix.targetPlatform }}, ${{ matrix.unityVersion }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
unityVersion: [6000.1.2f1]
targetPlatform:
- StandaloneLinux64
- iOS
- Android
# TODO: Add more platforms and versions
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
# Required due to open issue:
# https://github.com/game-ci/unity-test-runner/issues/223
- name: Move Into Subdirectory
shell: bash
run: |
mkdir root
shopt -s dotglob extglob
mv !(root) root/
- name: Install LiveKit Server
run: curl -sSL https://get.livekit.io | bash
- name: Run LiveKit Server
run: livekit-server --dev &
- name: Run Tests
uses: game-ci/unity-test-runner@v4
id: testRunner
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
projectPath: root
unityVersion: ${{ matrix.unityVersion }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
checkName: Test Results (${{ matrix.targetPlatform }}, ${{ matrix.unityVersion }})
packageMode: true
useHostNetwork: true
- name: Upload Test Results
uses: actions/upload-artifact@v4
if: always()
with:
name: Test results (${{ matrix.targetPlatform }}, ${{ matrix.unityVersion }})
path: ${{ steps.testRunner.outputs.artifactsPath }}
- name: Build
uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: ${{ matrix.targetPlatform }}
- name: Upload Build
uses: actions/upload-artifact@v4
with:
name: Build-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}