Add E2E testing and CI workflow #8
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| name: CI (${{ matrix.unityVersion }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| unityVersion: [6000.1.2f1] | |
| # TODO: Add more platforms and versions | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Move Into Subdirectory | |
| shell: bash | |
| run: | | |
| mkdir root | |
| shopt -s dotglob extglob | |
| mv !(root) root/ | |
| - name: Remove Plugins | |
| shell: bash | |
| run: find . -type d -name 'ffi-*' ! -name 'ffi-linux-x86_64' -exec rm -rf {} + | |
| - 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.unityVersion }}) | |
| packageMode: true | |
| useHostNetwork: true | |
| - name: Upload Test Results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: Test results (all modes, ${{ matrix.unityVersion }}) | |
| path: ${{ steps.testRunner.outputs.artifactsPath }} | |
| - uses: actions/upload-artifact@v3 | |
| if: always() | |
| with: | |
| name: Coverage results (${{ matrix.unityVersion }}) | |
| path: ${{ steps.testRunner.outputs.coveragePath }} |