外部FBXのロード #26
Workflow file for this run
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: Unity Test CI | |
on: | |
workflow_dispatch: {} | |
pull_request: | |
branches: | |
- develop | |
types: [opened, synchronize, reopened] | |
jobs: | |
test: | |
name: Unity Edit Mode Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4.2.2 | |
# スクリプトの変更をチェック | |
- name: スクリプトの変更をチェック | |
id: script_changes | |
uses: dorny/paths-filter@v3.0.2 | |
with: | |
filters: | | |
scripts: | |
- 'Assets/uDesktopMascot/Scripts/**/*.cs' | |
# 条件付きでキャッシュを設定 | |
- name: ライブラリのキャッシュ | |
if: ${{ steps.script_changes.outputs.scripts == 'true' }} | |
uses: actions/cache@v4.2.0 | |
with: | |
path: Library | |
key: Library-${{ runner.os }}-${{ hashFiles('**/Packages/manifest.json') }} | |
restore-keys: | | |
Library-${{ runner.os }}- | |
# 条件付きでUnityテストを実行 | |
- name: Unityテストを実行 | |
if: ${{ steps.script_changes.outputs.scripts == 'true' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }} | |
uses: game-ci/unity-test-runner@v4 | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
with: | |
projectPath: . | |
unityVersion: '6000.0.31f1' # プロジェクトのUnityバージョンに合わせてください | |
testMode: editmode | |
githubToken: ${{ secrets.GITHUB_TOKEN }} | |
artifactsPath: './artifacts' | |
# 条件付きでテスト結果をアップロード | |
- name: テスト結果をアップロード | |
if: ${{ steps.script_changes.outputs.scripts == 'true' }} | |
uses: actions/upload-artifact@v4.6.0 | |
with: | |
name: TestResults | |
path: "**/TestResults/*.xml" | |
# スクリプトが変更されていない場合の処理 | |
- name: テストをスキップ | |
if: ${{ steps.script_changes.outputs.scripts != 'true' }} | |
run: echo "対象のスクリプトに変更がないため、テストはパスしたものとみなします。" |