6
6
- master
7
7
- develop
8
8
pull_request :
9
- types : [synchronize, opened, reopened, ready_for_review]
9
+ types :
10
+ - synchronize
11
+ - opened
12
+ - reopened
13
+ - ready_for_review
10
14
branches :
11
15
- master
12
16
- develop
13
17
14
18
env :
15
19
PROJECT : Nextcloud.xcodeproj
16
- DESTINATION : platform=iOS Simulator,name=iPhone 16,OS=18.1
20
+ DESTINATION : platform=iOS Simulator,name=iPhone 16,OS=18.2
17
21
SCHEME : Nextcloud
18
- SERVER_BRANCH : stable28
19
- PHP_VERSION : 8.2
22
+ SERVER_BRANCH : stable30
23
+ PHP_VERSION : 8.3
20
24
21
25
jobs :
22
26
build :
30
34
- name : Download GoogleService-Info.plist
31
35
run : wget "https://raw.githubusercontent.com/firebase/quickstart-ios/master/mock-GoogleService-Info.plist" -O GoogleService-Info.plist
32
36
33
- - name : Build Nextcloud iOS
37
+ - name : Run Xcode Build
34
38
run : |
35
39
set -o pipefail && \
36
40
xcodebuild build-for-testing \
@@ -39,43 +43,51 @@ jobs:
39
43
-derivedDataPath "DerivedData" \
40
44
| xcbeautify --quieter
41
45
42
- - name : Upload test build
46
+ - name : Upload Build Products
43
47
uses : actions/upload-artifact@v4
44
48
with :
45
- name : Nextcloud iOS
49
+ name : Nextcloud for iOS
46
50
path : DerivedData/Build/Products
47
51
retention-days : 4
48
52
49
53
test :
50
- name : Test
54
+ name : Run Tests
51
55
runs-on : macos-15
52
56
needs : [build]
53
57
54
- if : github.event.pull_request.draft == false
58
+ # Temporarily, project has no effective tests except UI tests which are unfeasible on virtualized GitHub runners (see #3291)
59
+ # Previously: github.event.pull_request.draft == false
60
+ if : false
55
61
56
62
steps :
57
63
- uses : actions/checkout@v4
58
64
59
- - name : Set up php ${{ env.PHP_VERSION }}
60
- uses : shivammathur/setup-php@8872c784b04a1420e81191df5d64fbd59d3d3033 # v2.30.0
65
+ - name : Prepare PHP ${{ env.PHP_VERSION }}
66
+ uses : shivammathur/setup-php@v2
61
67
with :
62
68
php-version : ${{ env.PHP_VERSION }}
63
69
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
64
70
extensions : apcu, bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, pgsql, pdo_pgsql
65
71
coverage : none
66
72
ini-file : development
67
- # Temporary workaround for missing pcntl_* in PHP 8.3: ini-values: apc.enable_cli=on
68
73
ini-values : apc.enable_cli=on, disable_functions=
69
74
70
- - name : Checkout server
71
- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
75
+ - name : Checkout Nextcloud Server
76
+ uses : actions/checkout@v4
72
77
with :
73
78
submodules : true
74
79
repository : nextcloud/server
75
80
path : server
76
81
ref : ${{ env.SERVER_BRANCH }}
77
82
78
- - name : Set up Nextcloud
83
+ - name : Checkout Download Limits App
84
+ uses : actions/checkout@v4
85
+ with :
86
+ repository : nextcloud/files_downloadlimit
87
+ path : server/apps/files_downloadlimit
88
+ ref : ${{ env.SERVER_BRANCH }}
89
+
90
+ - name : Install Nextcloud Server
79
91
run : |
80
92
mkdir server/data
81
93
./server/occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
@@ -84,18 +96,33 @@ jobs:
84
96
./server/occ config:system:set ratelimit.protection.enabled --value false --type bool
85
97
./server/occ config:system:set memcache.local --value="\\OC\\Memcache\\APCu"
86
98
./server/occ config:system:set memcache.distributed --value="\\OC\\Memcache\\APCu"
99
+ ./server/occ app:enable files_downloadlimit
87
100
./server/occ background:cron
88
101
PHP_CLI_SERVER_WORKERS=5 php -S localhost:8080 -t server/ &
89
102
90
- - name : Download test build
103
+ - name : Download Build
91
104
uses : actions/download-artifact@v4
92
105
with :
93
- name : Nextcloud iOS
106
+ name : Nextcloud for iOS
94
107
95
- - name : Check server status
108
+ - name : Assert Nextcloud Server Status
96
109
run : curl -s --retry 5 --retry-delay 60 --retry-all-errors http://localhost:8080/status.php || true
97
110
98
- - name : Test Nextcloud iOS
111
+ - name : Boot iOS Simulator
112
+ run : |
113
+ xcrun simctl boot "iPhone 16"
114
+ xcrun simctl bootstatus "iPhone 16" || echo "Simulator booted"
115
+
116
+ - name : Check if Safari is installed
117
+ run : |
118
+ if xcrun simctl listapps booted | grep -q com.apple.mobilesafari; then
119
+ echo "Safari is installed in the simulator."
120
+ else
121
+ echo "Safari is NOT installed in the simulator."
122
+ exit 1
123
+ fi
124
+
125
+ - name : Run Xcode Test
99
126
run : |
100
127
set -o pipefail && \
101
128
xcodebuild test-without-building \
@@ -104,13 +131,11 @@ jobs:
104
131
-derivedDataPath "DerivedData" \
105
132
-test-iterations 3 \
106
133
-retry-tests-on-failure \
107
- -resultBundlePath "TestResult.xcresult" \
108
- | xcbeautify --quieter
134
+ -resultBundlePath "TestResult.xcresult"
109
135
110
- - name : Upload test results
136
+ - name : Upload Xcode Test Results
111
137
uses : actions/upload-artifact@v4
112
138
if : ${{ !cancelled() }}
113
139
with :
114
140
name : TestResult.xcresult
115
141
path : " TestResult.xcresult"
116
-
0 commit comments