Merge pull request #428 from Tuupertunut/patch-1 #146
This file contains 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: Test Companion App | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: {} | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
PROJECT_PATH: UltraStar Play Companion | |
jobs: | |
test-job: | |
name: Test for ${{ matrix.targetPlatform }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
unityVersion: | |
- 2022.2.4f1 | |
targetPlatform: | |
- Android | |
- iOS | |
steps: | |
# Clone repo and restore cache | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
lfs: true | |
- uses: actions/cache@v2 | |
with: | |
path: ${{ env.PROJECT_PATH }}/Library | |
key: Library-${{ env.PROJECT_PATH }}-${{ matrix.targetPlatform }}-${{ hashFiles(env.PROJECT_PATH) }} | |
restore-keys: | | |
Library-${{ env.PROJECT_PATH }}-${{ matrix.targetPlatform }}- | |
Library-${{ env.PROJECT_PATH }}- | |
Library- | |
# Run setup script | |
- name: Setup Script | |
working-directory: tools | |
run: sh setup.sh | |
# Test Unity project | |
- uses: game-ci/[email protected] | |
id: testRunner | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
with: | |
projectPath: ${{ env.PROJECT_PATH }} | |
unityVersion: ${{ matrix.unityVersion }} | |
testMode: all | |
githubToken: ${{ secrets.GITHUB_TOKEN }} | |
customParameters: "-nographics" | |
- uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: Test results (all modes) | |
path: ${{ steps.testRunner.outputs.artifactsPath }} |