Webview helper methods added #71
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: Run UI Tests Windows | |
on: | |
push: | |
branches: [ "main" ] | |
paths-ignore: | |
- "**.md" | |
pull_request: | |
branches: [ "main" ] | |
env: | |
BUILD_CONFIGURATION: Release | |
CSPROJ_TO_BUILD: samples/Plugin.Maui.UITestHelpers.Sample/Plugin.Maui.UITestHelpers.Sample.csproj | |
APP_TO_TEST: samples/Plugin.Maui.UITestHelpers.Sample/bin/Release/net8.0-windows10.0.19041.0/win10-x64/Plugin.Maui.UITestHelpers.Sample.exe | |
CSPROJ_TO_TEST: samples/UITests.Windows/UITests.Windows.csproj | |
TARGET_FRAMEWORK: net8.0-windows10.0.19041.0 | |
SCREENCAPTURE_FOLDER: samples/UITests.Windows/bin/Debug/net8.0 | |
ARTIFACTS_PATH: ${{ github.workspace }}/output | |
jobs: | |
ui-test-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build App | |
run: dotnet build ${{ env.CSPROJ_TO_BUILD }} -f ${{ env.TARGET_FRAMEWORK }} -c ${{ env.BUILD_CONFIGURATION }} | |
- name: Install Appium | |
run: | | |
npm install -g appium | |
appium driver install --source=npm appium-windows-driver | |
- name: Run UI Tests | |
run: | | |
# Set environment variable separately because of https://github.com/dotnet/sdk/issues/40848 | |
$absolutePath = ("${{ env.APP_TO_TEST }}" | Resolve-Path).Path | |
$env:APPID = $absolutePath | |
dotnet test ${{ env.CSPROJ_TO_TEST }} --environment APPIUM_LOG_FILE=${{ env.ARTIFACTS_PATH }}/appium-logs/appium.log | |
- name: Publish Artifacts | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: logs-and-screenshots | |
path: | | |
${{ env.ARTIFACTS_PATH }}/**/*.* | |
${{ env.SCREENCAPTURE_FOLDER }}/*.png |