-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (57 loc) · 1.94 KB
/
Copy pathtests.yml
File metadata and controls
69 lines (57 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: CI - Tests
on:
push:
branches: [development]
pull_request:
branches: [development]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: "10.0.x"
- name: Restore
run: dotnet workload install maui-android maui-windows
- name: Unit Tests (Shared)
run: dotnet test AllStream.Tests/AllStream.Tests.csproj --configuration Release --verbosity normal
- name: UI Integration Tests (Web)
run: dotnet test AllStream.Web.Tests/AllStream.Web.Tests.csproj --configuration Release --verbosity normal
android-ui-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: "10.0.x"
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install Appium
run: |
npm install -g appium
nohup appium --log-level info &
sleep 5
echo "APPIUM_SERVER=http://127.0.0.1:4723/" >> $GITHUB_ENV
- name: Build MAUI Android APK
run: |
dotnet workload install maui-android maui-windows
dotnet build AllStream/AllStream.csproj -c Release -f net10.0-android /p:AndroidPackageFormat=apk
APK=$(find AllStream -type f -name "*.apk" | head -n 1)
echo "Found APK: $APK"
echo "APK_PATH=$APK" >> $GITHUB_ENV
- name: Run Android Emulator and Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 30
arch: x86_64
target: default
profile: pixel
script: |
dotnet test AllStream.Android.UITests/AllStream.Android.UITests.csproj --configuration Release --verbosity normal