-
Notifications
You must be signed in to change notification settings - Fork 15
114 lines (94 loc) · 3.47 KB
/
ios_integration_test.yml
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: IOS CI
on:
push:
branches: [master, f-droid]
tags:
- "*"
pull_request:
branches: [master, f-droid]
env:
NODE_VERSION: 16.13.1
JAVA_VERSION: 12.x
ARTIFACT_PATH: ./screenshots
jobs:
cancel_previous_runs:
name: Cancel Previous Runs
runs-on: ubuntu-20.04
steps:
- uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
ios_device_test:
runs-on: macos-latest
timeout-minutes: 60
strategy:
matrix:
include:
- device: "iPhone 11 Pro Max"
record_video: true
- device: "iPhone 8 Plus"
record_video: false
- device: "iPad Pro (12.9-inch) (3rd generation)"
record_video: false
- device: "iPad Pro (12.9-inch) (2nd generation)"
record_video: false
fail-fast: false
steps:
# Setup Environment
- uses: actions/checkout@v3
- name: "Prepare environment for ios"
working-directory: ./scripts
run: ./ios_init_env.sh
- uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: "zulu"
- name: Install flutter wrapper
run: ./scripts/install_flutter_wrapper.sh
- name: "Create Simulator if iPad Pro 2nd gen"
if: ${{ matrix.device == 'iPad Pro (12.9-inch) (2nd generation)' }}
run: xcrun simctl create "iPad Pro (12.9-inch) (2nd generation)" "com.apple.CoreSimulator.SimDeviceType.iPad-Pro--12-9-inch---2nd-generation-" "com.apple.CoreSimulator.SimRuntime.iOS-16-2"
- name: "Create Simulator if iPad Pro 3rd gen"
if: ${{ matrix.device == 'iPad Pro (12.9-inch) (3rd generation)' }}
run: xcrun simctl create "iPad Pro (12.9-inch) (3rd generation)" "com.apple.CoreSimulator.SimDeviceType.iPad-Pro--12-9-inch---3rd-generation-" "com.apple.CoreSimulator.SimRuntime.iOS-16-2"
# JS Stuff
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Melos Install
run: ./scripts/install_melos.sh
- name: Melos Bootstrap
run: ./flutterw pub global run melos bootstrap
- name: "Build JS"
run: ./flutterw pub global run melos yarn-build
- name: Start colima a docker runtime for MacOs
run: |
brew install docker
colima start
- name: Run encointer-node
run: ./scripts/docker_run_encointer_node_notee.sh &
- name: Bootstrap Demo Community
run: ./scripts/docker_run_encointer_client_bootstrap_demo_community.sh
- name: "Start Simulator"
working-directory: ./scripts
env:
DEVICE_ID: ${{ matrix.device }}
run: source ./ios_emulator.sh
- name: Run integration tests with printscreens in all languages
if: startsWith(github.ref, 'refs/tags/')
run: ./scripts/multi_language_screenshot_ci_test.sh
env:
TEMP_DIR: ${{ env.ARTIFACT_PATH }}
RECORD: ${{ matrix.record_video }}
- name: Run integration tests with printscreens in en only
if: startsWith(github.ref , 'refs/tags/') != true
run: ./scripts/ios_integration_test.sh
env:
TEMP_DIR: ${{ env.ARTIFACT_PATH }}
RECORD: ${{ matrix.record_video }}
- name: "Upload screenshots and recording"
if: always()
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.device }}
path: ${{ env.ARTIFACT_PATH }}