-
Notifications
You must be signed in to change notification settings - Fork 10
/
semaphore.yml
95 lines (93 loc) · 3.56 KB
/
semaphore.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
version: v1.0
name: FlowCrypt iOS App
agent:
machine:
type: a2-standard-4
os_image: macos-xcode16
execution_time_limit:
minutes: 30
auto_cancel:
running:
when: branch != 'master'
fail_fast:
stop:
when: "true"
blocks:
- name: Build + Swift Unit Test
dependencies: []
run:
when: "change_in('/', {exclude: ['/Core/package.json', '/Core/package-lock.json']})"
execution_time_limit:
minutes: 30
task:
env_vars:
- name: LANG
value: en_US.UTF-8
- name: SEMAPHORE_GIT_DIR
value: /Users/semaphore/git/flowcrypt-ios
prologue:
commands:
- checkout && cd ~/git/flowcrypt-ios/
jobs:
- name: Build Xcode Project + Swift Unit Test
commands:
- fastlane build
# - fastlane test
- cd /var/tmp/derived_data/FlowCrypt/Build/Products/Debug-iphonesimulator && cache store FlowCrypt-$SEMAPHORE_GIT_SHA.app FlowCrypt.app
# - name: Build WebDriverAgent
# commands:
# - git clone https://github.com/appium/WebDriverAgent.git
# - cd WebDriverAgent
# - xcodebuild build-for-testing -project WebDriverAgent.xcodeproj -derivedDataPath /var/tmp/derived_data/WebDriverAgent -scheme WebDriverAgentRunner -destination "platform=iOS Simulator,name=iPhone SE (3rd generation)" CODE_SIGNING_ALLOWED=NO ARCHS="x86_64 arm64" ONLY_ACTIVE_ARCH=NO
# - cd /var/tmp/derived_data/WebDriverAgent/Build/Products/Debug-iphonesimulator && cache store WebDriverAgentRunner-Runner-$SEMAPHORE_GIT_SHA.app WebDriverAgentRunner-Runner.app
# - npm run lint
- name: UI Tests
dependencies:
- Build + Swift Unit Test
task:
agent:
machine:
type: a1-standard-4
os_image: macos-xcode16
env_vars:
- name: LANG
value: en_US.UTF-8
- name: SEMAPHORE_GIT_DIR
value: /Users/semaphore/git/flowcrypt-ios
prologue:
commands:
- checkout && cd ~/git/flowcrypt-ios/
- open -b com.apple.iphonesimulator
- mv ~/appium-env ~/git/flowcrypt-ios/appium/.env
- cache restore appium-npm && cd ./appium && npm i && cd .. && cache store appium-npm appium/node_modules
- cd appium
- cache restore FlowCrypt-$SEMAPHORE_GIT_SHA.app
# - cache restore WebDriverAgentRunner-Runner-$SEMAPHORE_GIT_SHA.app
epilogue:
always:
commands:
- artifact push job ~/git/flowcrypt-ios/appium/tmp
- test-results publish ~/git/flowcrypt-ios/appium/tmp/test-results
jobs:
- name: Run Mock inbox + compose tests
commands:
- npm run-script test.mock "check attachment after forward"
# - npm run-script test.mock.compose
# - name: Run Mock setup + live + other test
# commands:
# - npm run-script test.mock.setup
# - npm run-script test.mock.login-settings
# # temporary disabled because of e2e account login issue
# # - 'wget https://flowcrypt.s3.eu-central-1.amazonaws.com/release/flowcrypt-ios-old-version-for-ci-storage-compatibility-2022-05-09.zip -P ~/git/flowcrypt-ios/appium'
# # - unzip flowcrypt-ios-*.zip
# # - npm run-script test.live.all
secrets:
- name: flowcrypt-ios-ci-secrets
run:
when: "change_in('/', {exclude: ['/Core/package.json', '/Core/package-lock.json']})"
after_pipeline:
task:
jobs:
- name: Publish Results
commands:
- test-results gen-pipeline-report