-
Notifications
You must be signed in to change notification settings - Fork 91
102 lines (85 loc) · 2.52 KB
/
uitests.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
name: Build main target
on:
pull_request:
paths:
- '.github/workflows/**'
- NextcloudTalk.xcodeproj/**
- NextcloudTalk/**
- NextcloudTalkUITests/**
- NotificationServiceExtension/**
- ShareExtension/**
push:
branches:
- main
- master
- stable*
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build-and-test:
name: Build and Test
runs-on: macOS-latest
if: github.event.pull_request.draft == false
strategy:
matrix:
# Test with stable23 as well to find regressions in older versions
test-branches: ['stable23', 'stable27', 'master']
env:
WORKSPACE: NextcloudTalk.xcworkspace
DESTINATION: platform=iOS Simulator,name=iPhone 14,OS=16.2
SCHEME: NextcloudTalk
TEST_BRANCH: ${{ matrix.test-branches }}
CONTAINER_NAME: nextcloud_test
SERVER_PORT: 8080
steps:
- name: Checkout app
uses: actions/checkout@v3
with:
submodules: true
- uses: actions/cache@v3
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- uses: actions/cache@v3
with:
path: SourcePackages
key: ${{ runner.os }}-spm-${{ hashFiles('NextcloudTalk.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- name: Install docker
run: |
brew install docker
colima start
- name: Create docker test server
run: |
source ./ci-create-docker-server.sh
- name: Set up dependencies talk-ios
run: |
pod install
- name: Wait for server
run: |
source ./ci-wait-for-server.sh
- name: Install talk
run: |
source ./ci-install-talk.sh
- name: Build & Test NextcloudTalk iOS
run: |
set -o pipefail && xcodebuild test -workspace $WORKSPACE \
-scheme "$SCHEME" \
-destination "$DESTINATION" \
-test-iterations 3 \
-retry-tests-on-failure \
-resultBundlePath "testResult.xcresult" \
-clonedSourcePackagesDirPath SourcePackages \
| xcpretty
- name: Upload test results
uses: actions/upload-artifact@v3
if: ${{ !cancelled() }}
with:
name: testResults-${{ matrix.test-branches }}.xcresult
path: "testResult.xcresult"