Integration Test runs on ubicloud-standard-4-ubuntu-2204 #4
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
| # Copyright (c) 2021-2026 Koji Hasegawa. | |
| # This software is released under the MIT License. | |
| name: Integration Test | |
| run-name: ${{ github.workflow }} runs on ${{ github.event.inputs.runner }} | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| runner: | |
| type: choice | |
| description: Runner | |
| options: # see: https://www.ubicloud.com/docs/about/pricing | |
| - ubuntu-latest | |
| - ubicloud-standard-2-ubuntu-2204 | |
| - ubicloud-standard-4-ubuntu-2204 | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.inputs.runner }} | |
| cancel-in-progress: true | |
| permissions: { } | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| test: | |
| if: github.event.pull_request.head.repo.fork == false # Skip on public fork, because can not read secrets. | |
| runs-on: ${{ github.event.inputs.runner }} | |
| timeout-minutes: 20 | |
| permissions: | |
| contents: read | |
| checks: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| unityVersion: # Available versions see: https://game.ci/docs/docker/versions | |
| - 6000.0.43f1 | |
| - 6000.0.44f1 # pin test-framework v1.5.1 | |
| - 6000.0.59f2 # pin test-framework v1.6.0 | |
| - 6000.3.1f1 | |
| testMode: | |
| - PlayMode # run tests in editor | |
| include: | |
| - unityVersion: 6000.3.1f1 | |
| testMode: Standalone # run tests on player | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| submodules: false | |
| lfs: false | |
| - name: Restore cache | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 | |
| with: | |
| path: Library | |
| key: Library-${{ runner.os }}-${{ matrix.unityVersion }}-${{ hashFiles('Packages/packages-lock.json') }} | |
| restore-keys: | | |
| Library-${{ runner.os }}-${{ matrix.unityVersion }}- | |
| Library-${{ runner.os }}- | |
| Library- | |
| - name: Uninstall codecoverage package | |
| run: | | |
| npm install -g openupm-cli | |
| openupm remove com.unity.testtools.codecoverage | |
| - name: Set license secret key | |
| run: echo "secret_key=UNITY_LICENSE_$(echo ${{ matrix.unityVersion }} | cut -c 1-4)" >> "$GITHUB_ENV" | |
| - name: Run tests | |
| uses: game-ci/unity-test-runner@0ff419b913a3630032cbe0de48a0099b5a9f0ed9 # v4 | |
| with: | |
| githubToken: ${{ secrets.GITHUB_TOKEN }} | |
| unityVersion: ${{ matrix.unityVersion }} # Default is `auto` | |
| checkName: test result (${{ matrix.unityVersion }}, ${{ matrix.testMode }}) | |
| customParameters: -testCategory "Integration;!IgnoreCI" -testHelperScreenshotDirectory /github/workspace/artifacts/Screenshots | |
| # Note: `/github/workspace/artifacts` is the artifacts path inside the game-ci container | |
| testMode: ${{ matrix.testMode }} | |
| env: | |
| UNITY_LICENSE: ${{ secrets[env.secret_key] }} | |
| UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
| UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
| id: test | |
| - name: Upload test results | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: TestResults-Unity${{ matrix.unityVersion }}-${{ matrix.testMode }} | |
| path: | | |
| ${{ steps.test.outputs.artifactsPath }} | |
| if: always() |