.drone.yml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428
  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. litmus-v1:
  66. image: nextcloudci/litmus-php7.0:litmus-php7.0-4
  67. commands:
  68. - bash tests/travis/install.sh sqlite
  69. - bash apps/dav/tests/travis/litmus-v1/script.sh
  70. when:
  71. matrix:
  72. TESTS: litmus-v1
  73. litmus-v2:
  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-v2/script.sh
  78. when:
  79. matrix:
  80. TESTS: litmus-v2
  81. caldavtester:
  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/caldav/install.sh
  86. - bash apps/dav/tests/travis/caldav/script.sh
  87. when:
  88. matrix:
  89. TESTS: caldavtester
  90. carddavtester:
  91. image: nextcloudci/litmus-php7.0:litmus-php7.0-4
  92. commands:
  93. - bash tests/travis/install.sh sqlite
  94. - bash apps/dav/tests/travis/carddav/install.sh
  95. - bash apps/dav/tests/travis/carddav/script.sh
  96. when:
  97. matrix:
  98. TESTS: carddavtester
  99. nodb-php5.6:
  100. image: nextcloudci/php5.6:php5.6-7
  101. commands:
  102. - NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite
  103. when:
  104. matrix:
  105. DB: NODB
  106. PHP: 5.6
  107. nodb-php7.0:
  108. image: nextcloudci/php7.0:php7.0-6
  109. commands:
  110. - NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite
  111. when:
  112. matrix:
  113. DB: NODB
  114. PHP: "7.0"
  115. nodb-php7.1:
  116. image: nextcloudci/php7.1:php7.1-9
  117. commands:
  118. - NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite
  119. when:
  120. matrix:
  121. DB: NODB
  122. PHP: 7.1
  123. sqlite-php5.6:
  124. image: nextcloudci/php5.6:php5.6-7
  125. commands:
  126. - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite
  127. when:
  128. matrix:
  129. DB: sqlite
  130. PHP: 5.6
  131. sqlite-php7.0:
  132. image: nextcloudci/php7.0:php7.0-6
  133. commands:
  134. - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite
  135. when:
  136. matrix:
  137. DB: sqlite
  138. PHP: "7.0"
  139. sqlite-php7.1:
  140. image: nextcloudci/php7.1:php7.1-9
  141. commands:
  142. - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite
  143. when:
  144. matrix:
  145. DB: sqlite
  146. PHP: 7.1
  147. mysql-php5.6:
  148. image: nextcloudci/php5.6:php5.6-7
  149. commands:
  150. - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh mysql
  151. when:
  152. matrix:
  153. DB: mysql
  154. PHP: 5.6
  155. postgres-php5.6:
  156. image: nextcloudci/php5.6:php5.6-7
  157. commands:
  158. - sleep 10 # gives the database enough time to initialize
  159. - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh pgsql
  160. when:
  161. matrix:
  162. DB: postgres
  163. PHP: 5.6
  164. mysqlmb4-php5.6:
  165. image: nextcloudci/php5.6:php5.6-7
  166. commands:
  167. - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh mysqlmb4
  168. when:
  169. matrix:
  170. DB: mysqlmb4
  171. PHP: 5.6
  172. integration-capabilities_features:
  173. image: nextcloudci/integration-php7.0:integration-php7.0-2
  174. commands:
  175. - ./occ maintenance:install --admin-pass=admin
  176. - cd build/integration
  177. - ./run.sh capabilities_features/capabilities.feature
  178. when:
  179. matrix:
  180. TESTS: integration-capabilities_features
  181. integration-federation_features:
  182. image: nextcloudci/integration-php7.0:integration-php7.0-2
  183. commands:
  184. - ./occ maintenance:install --admin-pass=admin
  185. - cd build/integration
  186. - ./run.sh federation_features/federated.feature
  187. when:
  188. matrix:
  189. TESTS: integration-federation_features
  190. integration-auth:
  191. image: nextcloudci/integration-php7.0:integration-php7.0-2
  192. commands:
  193. - ./occ maintenance:install --admin-pass=admin
  194. - cd build/integration
  195. - ./run.sh features/auth.feature
  196. when:
  197. matrix:
  198. TESTS: integration-auth
  199. integration-carddav:
  200. image: nextcloudci/integration-php7.0:integration-php7.0-2
  201. commands:
  202. - ./occ maintenance:install --admin-pass=admin
  203. - cd build/integration
  204. - ./run.sh features/carddav.feature
  205. when:
  206. matrix:
  207. TESTS: integration-carddav
  208. integration-dav-v2:
  209. image: nextcloudci/integration-php7.0:integration-php7.0-2
  210. commands:
  211. - ./occ maintenance:install --admin-pass=admin
  212. - cd build/integration
  213. - ./run.sh features/dav-v2.feature
  214. when:
  215. matrix:
  216. TESTS: integration-dav-v2
  217. integration-ocs-v1:
  218. image: nextcloudci/integration-php7.0:integration-php7.0-2
  219. commands:
  220. - ./occ maintenance:install --admin-pass=admin
  221. - cd build/integration
  222. - ./run.sh features/ocs-v1.feature
  223. when:
  224. matrix:
  225. TESTS: integration-ocs-v1
  226. integration-sharing-v1:
  227. image: nextcloudci/integration-php7.0:integration-php7.0-2
  228. commands:
  229. - ./occ maintenance:install --admin-pass=admin
  230. - cd build/integration
  231. - ./run.sh features/sharing-v1.feature
  232. when:
  233. matrix:
  234. TESTS: integration-sharing-v1
  235. integration-checksums-v1:
  236. image: nextcloudci/integration-php7.0:integration-php7.0-2
  237. commands:
  238. - ./occ maintenance:install --admin-pass=admin
  239. - cd build/integration
  240. - ./run.sh features/checksums.feature
  241. when:
  242. matrix:
  243. TESTS: integration-checksums
  244. integration-external-storage:
  245. image: nextcloudci/integration-php7.0:integration-php7.0-2
  246. commands:
  247. - ./occ maintenance:install --admin-pass=admin
  248. - cd build/integration
  249. - ./run.sh features/external-storage.feature
  250. when:
  251. matrix:
  252. TESTS: integration-external-storage
  253. integration-provisioning-v1:
  254. image: nextcloudci/integration-php7.0:integration-php7.0-2
  255. commands:
  256. - ./occ maintenance:install --admin-pass=admin
  257. - cd build/integration
  258. - ./run.sh features/provisioning-v1.feature
  259. when:
  260. matrix:
  261. TESTS: integration-provisioning-v1
  262. integration-tags:
  263. image: nextcloudci/integration-php7.0:integration-php7.0-2
  264. commands:
  265. - ./occ maintenance:install --admin-pass=admin
  266. - cd build/integration
  267. - ./run.sh features/tags.feature
  268. when:
  269. matrix:
  270. TESTS: integration-tags
  271. integration-caldav:
  272. image: nextcloudci/integration-php7.0:integration-php7.0-2
  273. commands:
  274. - ./occ maintenance:install --admin-pass=admin
  275. - cd build/integration
  276. - ./run.sh features/caldav.feature
  277. when:
  278. matrix:
  279. TESTS: integration-caldav
  280. integration-comments:
  281. image: nextcloudci/integration-php7.0:integration-php7.0-2
  282. commands:
  283. - ./occ maintenance:install --admin-pass=admin
  284. - cd build/integration
  285. - ./run.sh features/comments.feature
  286. when:
  287. matrix:
  288. TESTS: integration-comments
  289. integration-favorites:
  290. image: nextcloudci/integration-php7.0:integration-php7.0-2
  291. commands:
  292. - ./occ maintenance:install --admin-pass=admin
  293. - cd build/integration
  294. - ./run.sh features/favorites.feature
  295. when:
  296. matrix:
  297. TESTS: integration-favorites
  298. integration-provisioning-v2:
  299. image: nextcloudci/integration-php7.0:integration-php7.0-2
  300. commands:
  301. - ./occ maintenance:install --admin-pass=admin
  302. - cd build/integration
  303. - ./run.sh features/provisioning-v2.feature
  304. when:
  305. matrix:
  306. TESTS: integration-provisioning-v2
  307. integration-webdav-related:
  308. image: nextcloudci/integration-php7.0:integration-php7.0-2
  309. commands:
  310. - ./occ maintenance:install --admin-pass=admin
  311. - cd build/integration
  312. - ./run.sh features/webdav-related.feature
  313. when:
  314. matrix:
  315. TESTS: integration-webdav-related
  316. integration-sharees-features:
  317. image: nextcloudci/integration-php7.0:integration-php7.0-2
  318. commands:
  319. - ./occ maintenance:install --admin-pass=admin
  320. - cd build/integration
  321. - ./run.sh sharees_features/sharees.feature
  322. when:
  323. matrix:
  324. TESTS: integration-sharees-features
  325. nodb-codecov:
  326. image: nextcloudci/php7.0:php7.0-6
  327. commands:
  328. - TEST_SELECTION=NODB ./autotest.sh sqlite
  329. - wget https://codecov.io/bash -O codecov.sh
  330. - 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"
  331. - 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"
  332. when:
  333. matrix:
  334. TESTS: nodb-codecov
  335. db-codecov:
  336. image: nextcloudci/php7.0:php7.0-6
  337. commands:
  338. - TEST_SELECTION=QUICKDB ./autotest.sh sqlite
  339. - wget https://codecov.io/bash -O codecov.sh
  340. - 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"
  341. - 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"
  342. when:
  343. matrix:
  344. TESTS: db-codecov
  345. matrix:
  346. include:
  347. - TESTS: signed-off-check
  348. - TESTS: htaccess-checker
  349. - TESTS: nodb-codecov
  350. - TESTS: db-codecov
  351. - TESTS: integration-capabilities_features
  352. - TESTS: integration-federation_features
  353. - TESTS: integration-auth
  354. - TESTS: integration-carddav
  355. - TESTS: integration-dav-v2
  356. - TESTS: integration-ocs-v1
  357. - TESTS: integration-sharing-v1
  358. - TESTS: integration-checksums
  359. - TESTS: integration-external-storage
  360. - TESTS: integration-provisioning-v1
  361. - TESTS: integration-tags
  362. - TESTS: integration-caldav
  363. - TESTS: integration-comments
  364. - TESTS: integration-favorites
  365. - TESTS: integration-provisioning-v2
  366. - TESTS: integration-webdav-related
  367. - TESTS: integration-sharees-features
  368. - TESTS: jsunit
  369. - TESTS: check-autoloader
  370. - TESTS: app-check-code
  371. - TESTS: syntax-php5.6
  372. - TESTS: syntax-php7.0
  373. - TESTS: litmus-v1
  374. - TESTS: litmus-v2
  375. - TESTS: caldavtester
  376. - TESTS: carddavtester
  377. - DB: NODB
  378. PHP: 5.6
  379. - DB: NODB
  380. PHP: 7.0
  381. - DB: NODB
  382. PHP: 7.1
  383. - DB: sqlite
  384. PHP: 5.6
  385. - DB: sqlite
  386. PHP: 7.0
  387. - DB: sqlite
  388. PHP: 7.1
  389. - DB: mysql
  390. PHP: 5.6
  391. - DB: postgres
  392. PHP: 5.6
  393. - DB: mysqlmb4
  394. PHP: 5.6
  395. services:
  396. cache:
  397. image: redis
  398. postgres:
  399. image: postgres
  400. environment:
  401. - POSTGRES_USER=oc_autotest
  402. - POSTGRES_PASSWORD=oc_autotest
  403. when:
  404. matrix:
  405. DB: postgres
  406. mysql:
  407. image: mysql
  408. environment:
  409. - MYSQL_ROOT_PASSWORD=owncloud
  410. - MYSQL_USER=oc_autotest
  411. - MYSQL_PASSWORD=owncloud
  412. - MYSQL_DATABASE=oc_autotest
  413. when:
  414. matrix:
  415. DB: mysql
  416. mysqlmb4:
  417. image: mysql
  418. environment:
  419. - MYSQL_ROOT_PASSWORD=owncloud
  420. - MYSQL_USER=oc_autotest
  421. - MYSQL_PASSWORD=owncloud
  422. - MYSQL_DATABASE=oc_autotest
  423. command: [ "--innodb_large_prefix=true", "--innodb_file_format=barracuda", "--innodb_file_per_table=true" ]
  424. when:
  425. matrix:
  426. DB: mysqlmb4