GGua 日本語リファレンスEnglishGitHub ↗
英語版が正式な参照です。内容に差異がある場合は、英語版を優先してください。
DOCS / CI

GitHub Actions

link1345/gua-testerは、Godot 4.7とUnity 6のGua UIテストを実行するバージョン付きCI workflowを提供します。

Godot 4.7

Godot composite ActionはWindows版Godotを取得し、配布済みGua addonを配置してGODOT_EXECUTABLEを設定します。project import後、外部Gua.Testing.Godotテストを実行します。

.github/workflows/godot.ymlyaml
jobs:
  godot:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v4
      - uses: link1345/gua-tester/godot@v2.2
        with:
          project-path: game
          test-project: tests/GuaTester.Tests.csproj
          godot-version: "4.7"
          godot-status: stable
          gua-plugin-tag: gua-v1.18.0
test-project(必須)

Gua.Testing.Godotを参照する.csprojです。

project-path

Godot projectのパス。既定値はgameです。

godot-version / godot-status

既定値は4.7stableです。

test-logger

既定値はtrx;LogFileName=godot.trxです。

出力はgodot-executableaddon-pathです。構成Actionのlink1345/gua-tester/setup-godot@v2.2link1345/gua-tester/link-gua-gdscript-addon@v2.2も個別に利用できます。

Unity 6 Windows x64

Unity reusable workflowは配布済みGua UPM packageを配置し、GameCIを使ってLinuxでrendered Windows x64 Mono Playerをビルドします。PlayerをWindows runnerへ渡し、画面解像度を1920x1080へ固定してから、GUA_UNITY_PLAYERを設定して外部NUnitテストを実行します。

.github/workflows/unity.ymlyaml
jobs:
  unity:
    if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
    uses: link1345/gua-tester/.github/workflows/unity.yml@v2.2
    with:
      project-path: game
      scene-path: Assets/Scenes/Title.unity
      test-project: tests/GuaTester.Unity.Tests.csproj
      artifact-key: game
      unity-version: auto
      gua-tag: gua-v1.18.0
    secrets:
      UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
      UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
      UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
      UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}

必須inputはproject-pathscene-pathtest-projectと、呼び出し元で一意なartifact-keyです。任意inputはunity-versiongua-repositorygua-tagdotnet-versionconfigurationtest-loggerartifact-pathです。checkout-repositorycheckout-refを使うと、別repoのfixtureを検証できます。同じrunから複数回呼び出す場合はartifact-keyへmatrix値を指定します。

Personalライセンス

UNITY_EMAILUNITY_PASSWORDUNITY_LICENSEを渡します。

Professionalライセンス

UNITY_EMAILUNITY_PASSWORDUNITY_SERIALを渡します。

対応target

Unity 6000.0以降、Windows x64、Mono、rendered Playerです。

artifact

Unity log、Player、TRX、diagnostics、Visual結果を保存します。

Visual差分レポート

link1345/gua-tester/visual-report@v2.2は、Gua.Testing.VisualのmanifestとPNGをworkflow artifactまたはGitHub Pages向けの静的レポートへ変換します。Godot/Unity共通です。

失敗したVisual reportを保存yaml
- name: Upload visual report
  if: failure()
  uses: link1345/gua-tester/visual-report@v2.2
  with:
    artifact-path: artifacts/gua
    test-outcome: failure
    upload-target: workflow

upload-target: pagesは信頼済みmainまたは手動実行だけで使用し、pages: writeid-token: writeを持つ別jobからdeployします。

v1からv2へ移行する

link1345/gua-tester@v1link1345/gua-tester/godot@v2.2へ変更します。v2にはroot互換Actionがありません。Godotの既定TRX名はgodot-gdscript.trxからgodot.trxへ変わります。