66 - master
77 - develop
88 pull_request :
9- types : [synchronize, opened, reopened, ready_for_review]
9+ types :
10+ - synchronize
11+ - opened
12+ - reopened
13+ - ready_for_review
1014 branches :
1115 - master
1216 - develop
1317
1418env :
1519 PROJECT : Nextcloud.xcodeproj
16- DESTINATION : platform=iOS Simulator,name=iPhone 15 ,OS=17 .2
20+ DESTINATION : platform=iOS Simulator,name=iPhone 16 ,OS=18 .2
1721 SCHEME : Nextcloud
18- SERVER_BRANCH : stable28
19- PHP_VERSION : 8.2
22+ SERVER_BRANCH : stable30
23+ PHP_VERSION : 8.3
2024
2125jobs :
2226 build :
2327 name : Build
24- runs-on : macos-13
28+ runs-on : macos-15
2529 if : github.event.pull_request.draft == false
2630
2731 steps :
2832 - uses : actions/checkout@v4
2933
30- - name : Restore Carhage Cache
31- uses : actions/cache@v3
32- id : carthage-cache
33- with :
34- path : Carthage
35- key : ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
36- restore-keys : |
37- ${{ runner.os }}-carthage-
38-
39- - name : Carthage
40- if : steps.carthage-cache.outputs.cache-hit != 'true'
41- run : carthage bootstrap --use-xcframeworks --platform iOS
42-
4334 - name : Download GoogleService-Info.plist
4435 run : wget "https://raw.githubusercontent.com/firebase/quickstart-ios/master/mock-GoogleService-Info.plist" -O GoogleService-Info.plist
4536
46- - name : Build Nextcloud iOS
37+ - name : Run Xcode Build
4738 run : |
4839 set -o pipefail && \
4940 xcodebuild build-for-testing \
@@ -52,43 +43,51 @@ jobs:
5243 -derivedDataPath "DerivedData" \
5344 | xcbeautify --quieter
5445
55- - name : Upload test build
46+ - name : Upload Build Products
5647 uses : actions/upload-artifact@v4
5748 with :
58- name : Nextcloud iOS
49+ name : Nextcloud for iOS
5950 path : DerivedData/Build/Products
6051 retention-days : 4
6152
6253 test :
63- name : Test
64- runs-on : macos-13
54+ name : Run Tests
55+ runs-on : macos-15
6556 needs : [build]
6657
67- 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
6861
6962 steps :
7063 - uses : actions/checkout@v4
7164
72- - name : Set up php ${{ env.PHP_VERSION }}
73- uses : shivammathur/setup-php@8872c784b04a1420e81191df5d64fbd59d3d3033 # v2.30.0
65+ - name : Prepare PHP ${{ env.PHP_VERSION }}
66+ uses : shivammathur/setup-php@v2
7467 with :
7568 php-version : ${{ env.PHP_VERSION }}
7669 # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
7770 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
7871 coverage : none
7972 ini-file : development
80- # Temporary workaround for missing pcntl_* in PHP 8.3: ini-values: apc.enable_cli=on
8173 ini-values : apc.enable_cli=on, disable_functions=
8274
83- - name : Checkout server
84- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
75+ - name : Checkout Nextcloud Server
76+ uses : actions/checkout@v4
8577 with :
8678 submodules : true
8779 repository : nextcloud/server
8880 path : server
8981 ref : ${{ env.SERVER_BRANCH }}
9082
91- - 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
9291 run : |
9392 mkdir server/data
9493 ./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
@@ -97,18 +96,33 @@ jobs:
9796 ./server/occ config:system:set ratelimit.protection.enabled --value false --type bool
9897 ./server/occ config:system:set memcache.local --value="\\OC\\Memcache\\APCu"
9998 ./server/occ config:system:set memcache.distributed --value="\\OC\\Memcache\\APCu"
99+ ./server/occ app:enable files_downloadlimit
100100 ./server/occ background:cron
101101 PHP_CLI_SERVER_WORKERS=5 php -S localhost:8080 -t server/ &
102102
103- - name : Download test build
103+ - name : Download Build
104104 uses : actions/download-artifact@v4
105105 with :
106- name : Nextcloud iOS
106+ name : Nextcloud for iOS
107107
108- - name : Check server status
108+ - name : Assert Nextcloud Server Status
109109 run : curl -s --retry 5 --retry-delay 60 --retry-all-errors http://localhost:8080/status.php || true
110110
111- - 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
112126 run : |
113127 set -o pipefail && \
114128 xcodebuild test-without-building \
@@ -117,13 +131,11 @@ jobs:
117131 -derivedDataPath "DerivedData" \
118132 -test-iterations 3 \
119133 -retry-tests-on-failure \
120- -resultBundlePath "TestResult.xcresult" \
121- | xcbeautify --quieter
134+ -resultBundlePath "TestResult.xcresult"
122135
123- - name : Upload test results
136+ - name : Upload Xcode Test Results
124137 uses : actions/upload-artifact@v4
125138 if : ${{ !cancelled() }}
126139 with :
127140 name : TestResult.xcresult
128141 path : " TestResult.xcresult"
129-
0 commit comments