Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/gua-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ jobs:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
permissions:
contents: read
uses: link1345/gua-tester/.github/workflows/unity.yml@v2.1
uses: link1345/gua-tester/.github/workflows/unity.yml@v2.2
with:
project-path: .
scene-path: Assets/Scenes/Main.unity
test-project: tests/GuaUiLab.Unity.Tests.csproj
artifact-key: unity-sample
unity-version: auto
gua-tag: gua-v0.15.0
gua-tag: gua-v1.18.0
artifact-path: artifacts/gua
secrets:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:

- name: Upload pull-request visual report
if: github.event_name == 'pull_request' && steps.visual-outcome.outputs.value == 'failure'
uses: link1345/gua-tester/visual-report@v2.1
uses: link1345/gua-tester/visual-report@v2.2
with:
artifact-path: downloaded
test-outcome: ${{ steps.visual-outcome.outputs.value }}
Expand All @@ -161,7 +161,7 @@ jobs:
- name: Prepare latest main visual report
id: pages-report
if: always() && (github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch')
uses: link1345/gua-tester/visual-report@v2.1
uses: link1345/gua-tester/visual-report@v2.2
with:
artifact-path: downloaded
test-outcome: ${{ steps.visual-outcome.outputs.value }}
Expand Down
2 changes: 1 addition & 1 deletion Packages/com.link1345.gua/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.link1345.gua",
"version": "0.15.0",
"version": "1.18.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Replace the vendored runtime, not just its manifest

When Unity builds this embedded package, it continues to ship the old runtime because this commit changes only the manifest: the tracked managed assemblies still report 0.15.0.0, and both native DLLs identify their core/runtime version as 0.15.0. Since Packages/manifest.json references this directory as a local embedded package, declaring it as 1.18.0 does not download replacement binaries; the sample therefore runs 0.15.0 while the test project and CI tooling expect 1.18.0. Replace all vendored managed and native artifacts with the actual 1.18.0 package contents.

Useful? React with 👍 / 👎.

"displayName": "Gua Runtime UI Automation",
"description": "Managed Unity adapter for the Gua runtime UI automation protocol.",
"unity": "6000.0",
Expand Down
10 changes: 5 additions & 5 deletions README-ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@

ウィンドウはリサイズ可能です。541×857のデザイン比率を維持して一様に拡大・縮小し、画面比率から余る領域は黒いレターボックスとして表示します。

UI自動化にはGua v0.15.0のUnity UPMパッケージを使用しています。実行中は既定で `ws://127.0.0.1:8765` にGua bridgeを開き、標準uGUIツリーを自動的に公開します。ポートは環境変数 `GUA_BRIDGE_PORT` で変更できます。
UI自動化にはGua v1.18.0のUnity UPMパッケージを使用しています。実行中は既定で `ws://127.0.0.1:8765` にGua bridgeを開き、標準uGUIツリーを自動的に公開します。ポートは環境変数 `GUA_BRIDGE_PORT` で変更できます。

## 実行

1. Unity Hubでこのディレクトリを開きます。
2. Unity `6000.5.3f1`で `Assets/Scenes/Main.unity` を開きます。
3. Playを押します。

Guaの管理DLLとWindows x64ネイティブDLLを含む公式UPMパッケージ v0.15.0は `Packages/com.link1345.gua` に固定しています。そのため、隣接するGuaソースリポジトリへの参照や別途のパッケージダウンロードは不要です。
Guaの管理DLLとWindows x64ネイティブDLLを含む公式UPMパッケージ v1.18.0は `Packages/com.link1345.gua` に固定しています。そのため、隣接するGuaソースリポジトリへの参照や別途のパッケージダウンロードは不要です。

## UIテスト

Expand Down Expand Up @@ -55,13 +55,13 @@ Remove-Item Env:GUA_VISUAL_REPORT_DEMO

## GitHub Actions

`.github/workflows/gua-tests.yml`で[`link1345/gua-tester`](https://github.com/link1345/gua-tester) v2.1を使用し、`main`へのpushとpull requestでUnity 6のWindows x64 Mono PlayerをビルドしてUIテストを実行します。Unity Playerのビルドにはrepository secretsの`UNITY_EMAIL`、`UNITY_PASSWORD`と、Personal用の`UNITY_LICENSE`またはProfessional用の`UNITY_SERIAL`が必要です。
`.github/workflows/gua-tests.yml`で[`link1345/gua-tester`](https://github.com/link1345/gua-tester) v2.2を使用し、`main`へのpushとpull requestでUnity 6のWindows x64 Mono PlayerをビルドしてUIテストを実行します。Unity Playerのビルドにはrepository secretsの`UNITY_EMAIL`、`UNITY_PASSWORD`と、Personal用の`UNITY_LICENSE`またはProfessional用の`UNITY_SERIAL`が必要です。

forkからのpull requestではUnity credentialsを渡さず、Unity jobをスキップします。`pull_request_target`は使用しません。

### Visual差分Viewer

pull requestでVisual比較が失敗すると、`visual-report@v2.1`が`comparison.json`とPNGを静的Viewerへ変換し、`gua-visual-report`というActions artifactとして保存します。通常のUnity build log、Player、TRX、Gua診断・Visual成果物も`gua-tester` v2.1のworkflow artifactとして保存されます。
pull requestでVisual比較が失敗すると、`visual-report@v2.2`が`comparison.json`とPNGを静的Viewerへ変換し、`gua-visual-report`というActions artifactとして保存します。通常のUnity build log、Player、TRX、Gua診断・Visual成果物も`gua-tester` v2.2のworkflow artifactとして保存されます。

`main`へのpushと手動実行では、最新結果をGitHub Pages artifactとしてアップロードし、専用jobからPagesへdeployします。repositoryのPages sourceを事前に **GitHub Actions** へ設定してください。

Expand All @@ -82,4 +82,4 @@ pull requestでVisual比較が失敗すると、`visual-report@v2.1`が`comparis
| `cancel_exit` | button | 終了確認 |
| `confirm_exit` | button | 終了確認 |

Gua v0.15.0が最初に対応するUnity構成に合わせ、Windows x64・Monoを対象にしています。IL2CPPとWindows以外のPlayerはこのサンプルの検証対象外です。
Gua v1.18.0で検証するUnity構成に合わせ、Windows x64・Monoを対象にしています。IL2CPPとWindows以外のPlayerはこのサンプルの検証対象外です。
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ This is a Unity sample project for [Gua](https://github.com/link1345/gua). It re

The window is resizable. The UI scales uniformly while preserving its 541×857 design aspect ratio, and any space outside that ratio is rendered as black letterboxing.

UI automation uses the Gua v0.15.0 Unity UPM package. At runtime, it opens a Gua bridge at `ws://127.0.0.1:8765` by default and automatically exposes the standard uGUI tree. Set the `GUA_BRIDGE_PORT` environment variable to use a different port.
UI automation uses the Gua v1.18.0 Unity UPM package. At runtime, it opens a Gua bridge at `ws://127.0.0.1:8765` by default and automatically exposes the standard uGUI tree. Set the `GUA_BRIDGE_PORT` environment variable to use a different port.

## Run the sample

1. Open this directory in Unity Hub.
2. Open `Assets/Scenes/Main.unity` with Unity `6000.5.3f1`.
3. Enter Play Mode.

The official UPM package v0.15.0, including the managed assemblies and Windows x64 native libraries, is pinned in `Packages/com.link1345.gua`. No adjacent Gua source repository or separate package download is required.
The official UPM package v1.18.0, including the managed assemblies and Windows x64 native libraries, is pinned in `Packages/com.link1345.gua`. No adjacent Gua source repository or separate package download is required.

## UI tests

Expand Down Expand Up @@ -54,13 +54,13 @@ Remove-Item Env:GUA_VISUAL_REPORT_DEMO

## GitHub Actions

`.github/workflows/gua-tests.yml` uses [`link1345/gua-tester`](https://github.com/link1345/gua-tester) v2.1 to build a Unity 6 Windows x64 Mono Player and run UI tests on pushes to `main` and on pull requests. Building the Unity Player requires the repository secrets `UNITY_EMAIL`, `UNITY_PASSWORD`, and either `UNITY_LICENSE` for a Personal license or `UNITY_SERIAL` for a Professional license.
`.github/workflows/gua-tests.yml` uses [`link1345/gua-tester`](https://github.com/link1345/gua-tester) v2.2 to build a Unity 6 Windows x64 Mono Player and run UI tests on pushes to `main` and on pull requests. Building the Unity Player requires the repository secrets `UNITY_EMAIL`, `UNITY_PASSWORD`, and either `UNITY_LICENSE` for a Personal license or `UNITY_SERIAL` for a Professional license.

Pull requests from forks do not receive Unity credentials, so the Unity job is skipped. The workflow does not use `pull_request_target`.

### Visual difference viewer

When a visual comparison fails in a pull request, `visual-report@v2.1` turns `comparison.json` and its PNGs into a static viewer and stores it as the `gua-visual-report` Actions artifact. The normal Unity build log, Player, TRX file, and Gua diagnostic and visual artifacts are also stored in the `gua-tester` v2.1 workflow artifact.
When a visual comparison fails in a pull request, `visual-report@v2.2` turns `comparison.json` and its PNGs into a static viewer and stores it as the `gua-visual-report` Actions artifact. The normal Unity build log, Player, TRX file, and Gua diagnostic and visual artifacts are also stored in the `gua-tester` v2.2 workflow artifact.

On pushes to `main` and manual runs, the latest report is uploaded as a GitHub Pages artifact and deployed by a dedicated job. Configure the repository's Pages source as **GitHub Actions** first.

Expand All @@ -81,4 +81,4 @@ Enable `visual-report-demo` in a manual run to reuse the Unity Player from the n
| `cancel_exit` | button | Exit confirmation |
| `confirm_exit` | button | Exit confirmation |

This sample targets Windows x64 and Mono, matching the initial Unity support in Gua v0.15.0. IL2CPP and non-Windows Players are outside the sample's validated scope.
This sample targets Windows x64 and Mono, matching the validated Unity configuration in Gua v1.18.0. IL2CPP and non-Windows Players are outside the sample's validated scope.
10 changes: 5 additions & 5 deletions tests/GuaUiLab.Unity.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Gua.Core" Version="0.15.0" />
<PackageReference Include="Gua.Testing" Version="0.15.0" />
<PackageReference Include="Gua.Testing.Recording" Version="0.15.0" />
<PackageReference Include="Gua.Testing.Unity" Version="0.15.0" />
<PackageReference Include="Gua.Testing.Visual" Version="0.15.0" />
<PackageReference Include="Gua.Core" Version="1.18.0" />
<PackageReference Include="Gua.Testing" Version="1.18.0" />
<PackageReference Include="Gua.Testing.Recording" Version="1.18.0" />
<PackageReference Include="Gua.Testing.Unity" Version="1.18.0" />
<PackageReference Include="Gua.Testing.Visual" Version="1.18.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.7.0" />
<PackageReference Include="NUnit" Version="4.6.1" />
<PackageReference Include="NUnit3TestAdapter" Version="6.2.0" />
Expand Down