-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (57 loc) · 2.39 KB
/
pullrequestandroid.yml
File metadata and controls
73 lines (57 loc) · 2.39 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
70
71
72
name: Build and Test Pull Requests
on:
pull_request:
branches:
- master
jobs:
buildandroid:
name: "Build and Test Pull Requests - Android"
env:
ANDROID_HOME: "/Users/runner/Library/Android/sdk"
ScreenshotFolder: "/Users/runner/screenshots"
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
runs-on: macos-latest
steps:
- uses: actions/[email protected]
- uses: malinskiy/action-android/install-sdk@release/0.1.1
- run: sdkmanager "platform-tools" "platforms;android-29"
- run: sdkmanager "build-tools;30.0.2"
- run: adb devices
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: '12.12.0'
- name: Set up Appium
run: |
npm install -g appium --unsafe-perm=true --allow-root
- name: Setup Nuget
uses: olegtarasov/download-nuget@v1
- name: Restore Nuget Packages
run: mono $NUGET_EXE restore VoucherRedemptionMobile.sln -source "https://api.nuget.org/v3/index.json;https://www.myget.org/F/transactionprocessing/api/v3/index.json"
- name: Build Code
run: msbuild /p:Configuration="Release" /p:Platform="iPhoneSimulator" /t:Build VoucherRedemptionMobile.sln
#- name: Run Unit Tests
# run: mono $GITHUB_WORKSPACE/VoucherRedemptionMobile/packages/NUnit.ConsoleRunner.3.11.1/tools/nunit3-console.exe VoucherRedemptionMobile.UnitTests/bin/Release/VoucherRedemptionMobile.UnitTests.dll
- name: Build APK
run: msbuild VoucherRedemptionMobile.Android/VoucherRedemptionMobile.Android.csproj -target:SignAndroidPackage /p:Configuration=Release
- name: Create Screenshot Folder
run: mkdir -p /Users/runner/screenshots
- name: Run Integration Tests - Android
uses: malinskiy/action-android/emulator-run-cmd@release/0.1.1
with:
cmd: dotnet test VoucherRedemptionMobile.IntegrationTests.WithAppium/VoucherRedemptionMobile.IntegrationTests.WithAppium.csproj --filter (Category=PRTest)&(Category=Android)
api: 28
tag: default
abi: x86
verbose: false
- uses: actions/[email protected]
if: failure()
with:
name: screenshots
path: /Users/runner/screenshots/**/*
- name: Save logcat output
uses: actions/upload-artifact@master
if: failure()
with:
name: logcat
path: artifacts/logcat.log