|
22 | 22 | with: |
23 | 23 | fetch-depth: 0 |
24 | 24 |
|
| 25 | + - name: Run uno-check (wasm) |
| 26 | + run: | |
| 27 | + dotnet tool install --global uno.check |
| 28 | + uno-check -v --ci --non-interactive --fix ` |
| 29 | + --skip xcode --skip gtk3 --skip vswin --skip vswinworkloads --skip unosdk ` |
| 30 | + --skip dotnetnewunotemplates --skip vsmac --skip androidsdk --skip openjdk --skip androidemulator ` |
| 31 | + --tfm net10.0-browserwasm |
| 32 | +
|
25 | 33 | - uses: dotnet/nbgv@f088059084cb5d872e9d1a994433ca6440c2bf72 # v0.4.2 |
26 | 34 | with: |
27 | 35 | toolVersion: 3.6.139 |
|
62 | 70 | path: artifacts/test-results/*.trx |
63 | 71 | reporter: dotnet-trx |
64 | 72 |
|
| 73 | + # WebAssembly Runtime Tests |
| 74 | + # Tests telemetry functionality in actual browser environment using Uno.UI.RuntimeTests.Engine |
| 75 | + # Follows official guide: https://github.com/unoplatform/uno.ui.runtimetests.engine |
| 76 | + wasm-tests: |
| 77 | + name: WASM Runtime Tests |
| 78 | + runs-on: ubuntu-latest |
| 79 | + if: true # Enabled - tests are now working |
| 80 | + |
| 81 | + steps: |
| 82 | + - name: Checkout |
| 83 | + uses: actions/checkout@v4 |
| 84 | + with: |
| 85 | + fetch-depth: 0 |
| 86 | + |
| 87 | + - name: Setup .NET |
| 88 | + uses: actions/setup-dotnet@v4 |
| 89 | + with: |
| 90 | + dotnet-version: 10.0.x |
| 91 | + |
| 92 | + - name: Run uno-check (wasm) |
| 93 | + run: | |
| 94 | + dotnet tool install --global uno.check |
| 95 | + uno-check -v --ci --non-interactive --fix \ |
| 96 | + --skip xcode --skip gtk3 --skip vswin --skip vswinworkloads --skip unosdk \ |
| 97 | + --skip dotnetnewunotemplates --skip vsmac --skip androidsdk --skip openjdk --skip androidemulator \ |
| 98 | + --tfm net10.0-browserwasm |
| 99 | +
|
| 100 | + - name: Install Uno.UI.RuntimeTests.Engine.Wasm.Runner |
| 101 | + run: dotnet tool install -g Uno.UI.RuntimeTests.Engine.Wasm.Runner --version 2.0.0-dev.37 |
| 102 | + |
| 103 | + - name: Install Chromium via Playwright |
| 104 | + run: npx playwright install chromium |
| 105 | + |
| 106 | + - name: Publish WASM Test Project |
| 107 | + run: | |
| 108 | + cd src/Uno.DevTools.Telemetry.WasmTests/Uno.DevTools.Telemetry.WasmTests |
| 109 | + # Disable trimming as required by RuntimeTests.Engine (uses reflection for test discovery) |
| 110 | + dotnet publish -c Release -f net10.0-browserwasm -p:PublishTrimmed=false -o ./publish |
| 111 | +
|
| 112 | + - name: Run WASM Runtime Tests |
| 113 | + run: | |
| 114 | + cd src/Uno.DevTools.Telemetry.WasmTests/Uno.DevTools.Telemetry.WasmTests |
| 115 | + # Run tests using the official Uno.UI.RuntimeTests.Engine.Wasm.Runner tool |
| 116 | + uno-runtimetests-wasm --app-path ./publish/wwwroot --output ./wasm-test-results.xml --timeout 300 |
| 117 | +
|
| 118 | + - name: Upload WASM Test Results |
| 119 | + uses: actions/upload-artifact@v4 |
| 120 | + if: always() |
| 121 | + with: |
| 122 | + name: wasm-test-results |
| 123 | + path: src/Uno.DevTools.Telemetry.WasmTests/Uno.DevTools.Telemetry.WasmTests/wasm-test-results.xml |
| 124 | + |
| 125 | + - name: Publish WASM Test Results |
| 126 | + uses: dorny/test-reporter@v2 |
| 127 | + if: always() |
| 128 | + with: |
| 129 | + name: WASM Tests |
| 130 | + path: src/Uno.DevTools.Telemetry.WasmTests/Uno.DevTools.Telemetry.WasmTests/wasm-test-results.xml |
| 131 | + reporter: dotnet-nunit |
| 132 | + |
65 | 133 | sign: |
66 | 134 | name: Sign Package |
67 | 135 | if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) }} |
|
0 commit comments