.drone.yml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. pipeline:
  2. clone:
  3. image: plugins/git
  4. depth: 1
  5. jsunit:
  6. image: nextcloudci/jsunit:jsunit-5
  7. commands:
  8. - ./autotest-js.sh
  9. - curl -o codecov.sh https://codecov.io/bash
  10. - sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5; fi"
  11. - sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5; fi"
  12. when:
  13. matrix:
  14. TESTS: jsunit
  15. check-autoloader:
  16. image: nextcloudci/php7.0:php7.0-6
  17. commands:
  18. - bash ./build/autoloaderchecker.sh
  19. when:
  20. matrix:
  21. TESTS: check-autoloader
  22. app-check-code:
  23. image: nextcloudci/php7.0:php7.0-6
  24. commands:
  25. - ./occ app:check-code admin_audit
  26. - ./occ app:check-code comments
  27. - ./occ app:check-code federation
  28. - ./occ app:check-code sharebymail
  29. - ./occ app:check-code systemtags
  30. - ./occ app:check-code theming
  31. - ./occ app:check-code workflowengine
  32. when:
  33. matrix:
  34. TESTS: app-check-code
  35. signed-off-check:
  36. image: nextcloudci/php7.0:php7.0-6
  37. commands:
  38. - php ./build/signed-off-checker.php
  39. when:
  40. matrix:
  41. TESTS: signed-off-check
  42. htaccess-checker:
  43. image: nextcloudci/php7.0:php7.0-6
  44. commands:
  45. - php ./build/htaccess-checker.php
  46. when:
  47. matrix:
  48. TESTS: htaccess-checker
  49. syntax-php5.6:
  50. image: nextcloudci/php5.6:php5.6-7
  51. commands:
  52. - composer install
  53. - ./lib/composer/bin/parallel-lint --exclude lib/composer/jakub-onderka/ --exclude 3rdparty/symfony/polyfill-php70/Resources/stubs/ --exclude 3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/ --exclude 3rdparty/paragonie/random_compat/lib/ --exclude lib/composer/composer/autoload_static.php --exclude 3rdparty/composer/autoload_static.php .
  54. when:
  55. matrix:
  56. TESTS: syntax-php5.6
  57. syntax-php7.0:
  58. image: nextcloudci/php7.0:php7.0-6
  59. commands:
  60. - composer install
  61. - ./lib/composer/bin/parallel-lint --exclude lib/composer/jakub-onderka/ --exclude 3rdparty/symfony/polyfill-php70/Resources/stubs/ --exclude 3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/ --exclude 3rdparty/paragonie/random_compat/lib/ --exclude lib/composer/composer/autoload_static.php --exclude 3rdparty/composer/autoload_static.php .
  62. when:
  63. matrix:
  64. TESTS: syntax-php7.0
  65. syntax-php7.1:
  66. image: nextcloudci/php7.1:php7.1-10
  67. commands:
  68. - composer install
  69. - ./lib/composer/bin/parallel-lint --exclude lib/composer/jakub-onderka/ --exclude 3rdparty/symfony/polyfill-php70/Resources/stubs/ --exclude 3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/ --exclude 3rdparty/paragonie/random_compat/lib/ --exclude lib/composer/composer/autoload_static.php --exclude 3rdparty/composer/autoload_static.php .
  70. when:
  71. matrix:
  72. TESTS: syntax-php7.1
  73. litmus-v1:
  74. image: nextcloudci/litmus-php7.0:litmus-php7.0-4
  75. commands:
  76. - bash tests/travis/install.sh sqlite
  77. - bash apps/dav/tests/travis/litmus-v1/script.sh
  78. when:
  79. matrix:
  80. TESTS: litmus-v1
  81. litmus-v2:
  82. image: nextcloudci/litmus-php7.0:litmus-php7.0-4
  83. commands:
  84. - bash tests/travis/install.sh sqlite
  85. - bash apps/dav/tests/travis/litmus-v2/script.sh
  86. when:
  87. matrix:
  88. TESTS: litmus-v2
  89. caldavtester:
  90. image: nextcloudci/litmus-php7.0:litmus-php7.0-4
  91. commands:
  92. - bash tests/travis/install.sh sqlite
  93. - bash apps/dav/tests/travis/caldav/install.sh
  94. - bash apps/dav/tests/travis/caldav/script.sh
  95. when:
  96. matrix:
  97. TESTS: caldavtester
  98. carddavtester:
  99. image: nextcloudci/litmus-php7.0:litmus-php7.0-4
  100. commands:
  101. - bash tests/travis/install.sh sqlite
  102. - bash apps/dav/tests/travis/carddav/install.sh
  103. - bash apps/dav/tests/travis/carddav/script.sh
  104. when:
  105. matrix:
  106. TESTS: carddavtester
  107. nodb-php5.6:
  108. image: nextcloudci/php5.6:php5.6-7
  109. commands:
  110. - NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite
  111. when:
  112. matrix:
  113. DB: NODB
  114. PHP: 5.6
  115. nodb-php7.0:
  116. image: nextcloudci/php7.0:php7.0-6
  117. commands:
  118. - NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite
  119. when:
  120. matrix:
  121. DB: NODB
  122. PHP: "7.0"
  123. nodb-php7.1:
  124. image: nextcloudci/php7.1:php7.1-10
  125. commands:
  126. - NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite
  127. when:
  128. matrix:
  129. DB: NODB
  130. PHP: 7.1
  131. sqlite-php5.6:
  132. image: nextcloudci/php5.6:php5.6-7
  133. commands:
  134. - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite
  135. when:
  136. matrix:
  137. DB: sqlite
  138. PHP: 5.6
  139. sqlite-php7.0:
  140. image: nextcloudci/php7.0:php7.0-6
  141. commands:
  142. - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite
  143. when:
  144. matrix:
  145. DB: sqlite
  146. PHP: "7.0"
  147. sqlite-php7.1:
  148. image: nextcloudci/php7.1:php7.1-10
  149. commands:
  150. - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite
  151. when:
  152. matrix:
  153. DB: sqlite
  154. PHP: 7.1
  155. mysql-php5.6:
  156. image: nextcloudci/php5.6:php5.6-7
  157. commands:
  158. - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh mysql
  159. when:
  160. matrix:
  161. DB: mysql
  162. PHP: 5.6
  163. postgres-php5.6:
  164. image: nextcloudci/php5.6:php5.6-7
  165. commands:
  166. - sleep 10 # gives the database enough time to initialize
  167. - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh pgsql
  168. when:
  169. matrix:
  170. DB: postgres
  171. PHP: 5.6
  172. mysqlmb4-php5.6:
  173. image: nextcloudci/php5.6:php5.6-7
  174. commands:
  175. - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh mysqlmb4
  176. when:
  177. matrix:
  178. DB: mysqlmb4
  179. PHP: 5.6
  180. integration-capabilities_features:
  181. image: nextcloudci/integration-php7.0:integration-php7.0-2
  182. commands:
  183. - ./occ maintenance:install --admin-pass=admin
  184. - cd build/integration
  185. - ./run.sh capabilities_features/capabilities.feature
  186. when:
  187. matrix:
  188. TESTS: integration-capabilities_features
  189. integration-federation_features:
  190. image: nextcloudci/integration-php7.0:integration-php7.0-2
  191. commands:
  192. - ./occ maintenance:install --admin-pass=admin
  193. - cd build/integration
  194. - ./run.sh federation_features/federated.feature
  195. when:
  196. matrix:
  197. TESTS: integration-federation_features
  198. integration-auth:
  199. image: nextcloudci/integration-php7.0:integration-php7.0-2
  200. commands:
  201. - ./occ maintenance:install --admin-pass=admin
  202. - cd build/integration
  203. - ./run.sh features/auth.feature
  204. when:
  205. matrix:
  206. TESTS: integration-auth
  207. integration-carddav:
  208. image: nextcloudci/integration-php7.0:integration-php7.0-2
  209. commands:
  210. - ./occ maintenance:install --admin-pass=admin
  211. - cd build/integration
  212. - ./run.sh features/carddav.feature
  213. when:
  214. matrix:
  215. TESTS: integration-carddav
  216. integration-dav-v2:
  217. image: nextcloudci/integration-php7.0:integration-php7.0-2
  218. commands:
  219. - ./occ maintenance:install --admin-pass=admin
  220. - cd build/integration
  221. - ./run.sh features/dav-v2.feature
  222. when:
  223. matrix:
  224. TESTS: integration-dav-v2
  225. integration-ocs-v1:
  226. image: nextcloudci/integration-php7.0:integration-php7.0-2
  227. commands:
  228. - ./occ maintenance:install --admin-pass=admin
  229. - cd build/integration
  230. - ./run.sh features/ocs-v1.feature
  231. when:
  232. matrix:
  233. TESTS: integration-ocs-v1
  234. integration-sharing-v1:
  235. image: nextcloudci/integration-php7.0:integration-php7.0-2
  236. commands:
  237. - ./occ maintenance:install --admin-pass=admin
  238. - cd build/integration
  239. - ./run.sh features/sharing-v1.feature
  240. when:
  241. matrix:
  242. TESTS: integration-sharing-v1
  243. integration-checksums-v1:
  244. image: nextcloudci/integration-php7.0:integration-php7.0-2
  245. commands:
  246. - ./occ maintenance:install --admin-pass=admin
  247. - cd build/integration
  248. - ./run.sh features/checksums.feature
  249. when:
  250. matrix:
  251. TESTS: integration-checksums
  252. integration-external-storage:
  253. image: nextcloudci/integration-php7.0:integration-php7.0-2
  254. commands:
  255. - ./occ maintenance:install --admin-pass=admin
  256. - cd build/integration
  257. - ./run.sh features/external-storage.feature
  258. when:
  259. matrix:
  260. TESTS: integration-external-storage
  261. integration-provisioning-v1:
  262. image: nextcloudci/integration-php7.0:integration-php7.0-2
  263. commands:
  264. - ./occ maintenance:install --admin-pass=admin
  265. - cd build/integration
  266. - ./run.sh features/provisioning-v1.feature
  267. when:
  268. matrix:
  269. TESTS: integration-provisioning-v1
  270. integration-tags:
  271. image: nextcloudci/integration-php7.0:integration-php7.0-2
  272. commands:
  273. - ./occ maintenance:install --admin-pass=admin
  274. - cd build/integration
  275. - ./run.sh features/tags.feature
  276. when:
  277. matrix:
  278. TESTS: integration-tags
  279. integration-caldav:
  280. image: nextcloudci/integration-php7.0:integration-php7.0-2
  281. commands:
  282. - ./occ maintenance:install --admin-pass=admin
  283. - cd build/integration
  284. - ./run.sh features/caldav.feature
  285. when:
  286. matrix:
  287. TESTS: integration-caldav
  288. integration-comments:
  289. image: nextcloudci/integration-php7.0:integration-php7.0-2
  290. commands:
  291. - ./occ maintenance:install --admin-pass=admin
  292. - cd build/integration
  293. - ./run.sh features/comments.feature
  294. when:
  295. matrix:
  296. TESTS: integration-comments
  297. integration-favorites:
  298. image: nextcloudci/integration-php7.0:integration-php7.0-2
  299. commands:
  300. - ./occ maintenance:install --admin-pass=admin
  301. - cd build/integration
  302. - ./run.sh features/favorites.feature
  303. when:
  304. matrix:
  305. TESTS: integration-favorites
  306. integration-provisioning-v2:
  307. image: nextcloudci/integration-php7.0:integration-php7.0-2
  308. commands:
  309. - ./occ maintenance:install --admin-pass=admin
  310. - cd build/integration
  311. - ./run.sh features/provisioning-v2.feature
  312. when:
  313. matrix:
  314. TESTS: integration-provisioning-v2
  315. integration-webdav-related:
  316. image: nextcloudci/integration-php7.0:integration-php7.0-2
  317. commands:
  318. - ./occ maintenance:install --admin-pass=admin
  319. - cd build/integration
  320. - ./run.sh features/webdav-related.feature
  321. when:
  322. matrix:
  323. TESTS: integration-webdav-related
  324. integration-sharees-features:
  325. image: nextcloudci/integration-php7.0:integration-php7.0-2
  326. commands:
  327. - ./occ maintenance:install --admin-pass=admin
  328. - cd build/integration
  329. - ./run.sh sharees_features/sharees.feature
  330. when:
  331. matrix:
  332. TESTS: integration-sharees-features
  333. integration-setup-features:
  334. image: nextcloudci/integration-php7.0:integration-php7.0-2
  335. commands:
  336. - cd build/integration
  337. - ./run.sh setup_features/setup.feature
  338. when:
  339. matrix:
  340. TESTS: integration-setup-features
  341. nodb-codecov:
  342. image: nextcloudci/php7.0:php7.0-6
  343. commands:
  344. - TEST_SELECTION=NODB ./autotest.sh sqlite
  345. - wget https://codecov.io/bash -O codecov.sh
  346. - sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-clover-sqlite.xml; fi"
  347. - sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-clover-sqlite.xml; fi"
  348. when:
  349. matrix:
  350. TESTS: nodb-codecov
  351. db-codecov:
  352. image: nextcloudci/php7.0:php7.0-6
  353. commands:
  354. - TEST_SELECTION=QUICKDB ./autotest.sh sqlite
  355. - wget https://codecov.io/bash -O codecov.sh
  356. - sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-clover-sqlite.xml; fi"
  357. - sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-clover-sqlite.xml; fi"
  358. when:
  359. matrix:
  360. TESTS: db-codecov
  361. matrix:
  362. include:
  363. - TESTS: signed-off-check
  364. - TESTS: htaccess-checker
  365. - TESTS: nodb-codecov
  366. - TESTS: db-codecov
  367. - TESTS: integration-capabilities_features
  368. - TESTS: integration-federation_features
  369. - TESTS: integration-auth
  370. - TESTS: integration-carddav
  371. - TESTS: integration-dav-v2
  372. - TESTS: integration-ocs-v1
  373. - TESTS: integration-sharing-v1
  374. - TESTS: integration-checksums
  375. - TESTS: integration-external-storage
  376. - TESTS: integration-provisioning-v1
  377. - TESTS: integration-tags
  378. - TESTS: integration-caldav
  379. - TESTS: integration-comments
  380. - TESTS: integration-favorites
  381. - TESTS: integration-provisioning-v2
  382. - TESTS: integration-webdav-related
  383. - TESTS: integration-sharees-features
  384. - TESTS: integration-setup-features
  385. - TESTS: jsunit
  386. - TESTS: check-autoloader
  387. - TESTS: app-check-code
  388. - TESTS: syntax-php5.6
  389. - TESTS: syntax-php7.0
  390. - TESTS: syntax-php7.1
  391. - TESTS: litmus-v1
  392. - TESTS: litmus-v2
  393. - TESTS: caldavtester
  394. - TESTS: carddavtester
  395. - DB: NODB
  396. PHP: 5.6
  397. - DB: NODB
  398. PHP: 7.0
  399. - DB: NODB
  400. PHP: 7.1
  401. - DB: sqlite
  402. PHP: 5.6
  403. - DB: sqlite
  404. PHP: 7.0
  405. - DB: sqlite
  406. PHP: 7.1
  407. - DB: mysql
  408. PHP: 5.6
  409. - DB: postgres
  410. PHP: 5.6
  411. - DB: mysqlmb4
  412. PHP: 5.6
  413. services:
  414. cache:
  415. image: redis
  416. postgres:
  417. image: postgres
  418. environment:
  419. - POSTGRES_USER=oc_autotest
  420. - POSTGRES_PASSWORD=oc_autotest
  421. when:
  422. matrix:
  423. DB: postgres
  424. mysql:
  425. image: mysql
  426. environment:
  427. - MYSQL_ROOT_PASSWORD=owncloud
  428. - MYSQL_USER=oc_autotest
  429. - MYSQL_PASSWORD=owncloud
  430. - MYSQL_DATABASE=oc_autotest
  431. when:
  432. matrix:
  433. DB: mysql
  434. mysqlmb4:
  435. image: mysql
  436. environment:
  437. - MYSQL_ROOT_PASSWORD=owncloud
  438. - MYSQL_USER=oc_autotest
  439. - MYSQL_PASSWORD=owncloud
  440. - MYSQL_DATABASE=oc_autotest
  441. command: [ "--innodb_large_prefix=true", "--innodb_file_format=barracuda", "--innodb_file_per_table=true" ]
  442. when:
  443. matrix:
  444. DB: mysqlmb4