https://github.com/owncloud/core
Raw File
Tip revision: ab39e9a61c23c8f22c3c197b5447cc846b85d3eb authored by Vincent Petry on 07 February 2018, 09:22:43 UTC
Set version to 10.0.7 RC1
Tip revision: ab39e9a
.drone.yml
workspace:
  base: /drone
  path: src

branches: [master, stable10, stable9.1, stable9, hotfix-*]

clone:
  git:
    image: plugins/git
    depth: 1

pipeline:
  restore:
    image: plugins/s3-cache:1
    pull: true
    secrets: [ cache_s3_endpoint, cache_s3_access_key, cache_s3_secret_key ]
    restore: true
    when:
      local: false
      event: [push, pull_request]

  composer:
    image: owncloudci/php:${PHP_VERSION}
    pull: true
    commands:
      - ./tests/drone/composer-install.sh
    when:
      event: [push, pull_request]

  npm:
    image: owncloudci/php:${PHP_VERSION}
    pull: true
    commands:
      - ./tests/drone/npm-install.sh
    when:
      event: [push, pull_request]

  bower:
    image: owncloudci/php:${PHP_VERSION}
    pull: true
    commands:
      - ./tests/drone/bower-install.sh
    when:
      event: [push, pull_request]

  rebuild:
    image: plugins/s3-cache:1
    pull: true
    secrets: [ cache_s3_endpoint, cache_s3_access_key, cache_s3_secret_key ]
    rebuild: true
    mount:
      - lib/composer
      - core/vendor
      - build/node_modules
    when:
      local: false
      event: [ push ]

  flush:
    image: plugins/s3-cache:1
    pull: true
    secrets: [ cache_s3_endpoint, cache_s3_access_key, cache_s3_secret_key ]
    flush: true
    flush_age: 14
    when:
      local: false
      event: [push]

  coverage:
    image: owncloudci/php:${PHP_VERSION}
    pull: true
    group: test
    environment:
      - PHP_VERSION=${PHP_VERSION}
      - DB_TYPE=${DB_TYPE}
    commands:
      - ./tests/drone/test-coverage.sh
    when:
      event: [push, pull_request]
      matrix:
        TEST_SUITE: coverage

  codecov:
    image: plugins/codecov:2
    secrets: [codecov_token]
    pull: true
    files:
     - tests/autotest-clover-${DB_TYPE}.xml
    when:
      event: [push, pull_request]
      matrix:
        TEST_SUITE: coverage

  javascript:
    image: owncloudci/php:${PHP_VERSION}
    pull: true
    group: test
    commands:
      - ./tests/drone/test-javascript.sh
    when:
      matrix:
        TEST_SUITE: phpunit

  phpunit:
    image: owncloudci/php:${PHP_VERSION}
    pull: true
    group: test
    environment:
      - PHP_VERSION=${PHP_VERSION}
      - DB_TYPE=${DB_TYPE}
    commands:
      - ./tests/drone/test-phpunit.sh
    when:
      matrix:
        TEST_SUITE: phpunit

  install-server:
    image: owncloudci/php:${PHP_VERSION}
    pull: true
    commands:
      - cd /drone/src/
      - php occ maintenance:install -vvv --database=mysql --database-host=${DB_TYPE} --database-user=owncloud --database-pass=owncloud --database-name=owncloud --database-table-prefix=oc_ --admin-user=admin --admin-pass=admin --data-dir=/drone/src/data
      - php occ a:l
      - php occ a:e testing
      - php occ a:l
      - php occ config:system:set trusted_domains 1 --value=server
      - php occ config:system:set trusted_domains 2 --value=federated
      - php occ log:manage --level 0
      - php occ config:list
    when:
      matrix:
        TEST_SUITE: selenium

  owncloud-log:
    image: owncloud/ubuntu:16.04
    detach: true
    pull: true
    commands:
      - tail -f /drone/src/data/owncloud.log
    when:
      matrix:
        TEST_SUITE: selenium

  acceptance-tests:
    image: owncloudci/php:latest
    pull: true
    environment:
      - BROWSER=chrome
      - SELENIUM_HOST=selenium
      - SRV_HOST_NAME=server
      - SRV_HOST_PORT=80
      - REMOTE_FED_SRV_HOST_NAME=federated
      - REMOTE_FED_SRV_HOST_PORT=80
      - SKELETON_DIR=/drone/src/tests/ui/skeleton
      - SELENIUM_PORT=4444
      - PLATFORM=Linux
    commands:
      - cd /drone/src/
      - chown www-data * -R
      - bash tests/travis/start_ui_tests.sh --remote 
    when:
      matrix:
        TEST_SUITE: selenium

services:
  mariadb:
    image: mariadb:10.2
    environment:
      - MYSQL_USER=owncloud
      - MYSQL_PASSWORD=owncloud
      - MYSQL_DATABASE=owncloud
      - MYSQL_ROOT_PASSWORD=owncloud
    when:
      matrix:
        DB_TYPE: mariadb

  mysql:
    image: mysql:5.5
    environment:
      - MYSQL_USER=owncloud
      - MYSQL_PASSWORD=owncloud
      - MYSQL_DATABASE=owncloud
      - MYSQL_ROOT_PASSWORD=owncloud
    when:
      matrix:
        DB_TYPE: mysql

  mysqlmb4:
    image: mysql:5.7
    environment:
      - MYSQL_USER=owncloud
      - MYSQL_PASSWORD=owncloud
      - MYSQL_DATABASE=owncloud
      - MYSQL_ROOT_PASSWORD=owncloud
    when:
      matrix:
        DB_TYPE: mysqlmb4

  postgres:
    image: postgres:9.4
    environment:
      - POSTGRES_USER=owncloud
      - POSTGRES_PASSWORD=owncloud
      - POSTGRES_DB=owncloud
    when:
      matrix:
        DB_TYPE: postgres

  # oracle:
  #   image: oracle:x.x
  #   environment:
  #     - ORACLE_USER=owncloud
  #     - ORACLE_PASSWORD=owncloud
  #     - ORACLE_DB=owncloud
  #   when:
  #     matrix:
  #       DB_TYPE: oracle

  selenium:
    image: selenium/standalone-chrome-debug:latest
    pull: true
    when:
      matrix:
        TEST_SUITE: selenium

  server:
    image: owncloudci/php:latest
    pull: true
    environment:
      - APACHE_WEBROOT=/drone/src/
    command: [ "/usr/local/bin/apachectl", "-e debug" , "-DFOREGROUND" ]
    when:
      matrix:
        USE_SERVER: true

  federated:
    image: owncloudci/php:latest
    pull: true
    environment:
      - APACHE_WEBROOT=/drone/src/
    command: [ "/usr/local/bin/apachectl", "-e debug" , "-DFOREGROUND" ]
    when:
      matrix:
        USE_FEDERATED_SERVER: true
matrix:
  include:
    # PHP 5.6
    #- PHP_VERSION: 5.6
    #  DB_TYPE: sqlite
    #  TEST_SUITE: phpunit
    #- PHP_VERSION: 5.6
    #  DB_TYPE: mariadb
    #  TEST_SUITE: phpunit
    #- PHP_VERSION: 5.6
    #  DB_TYPE: mysql
    #  TEST_SUITE: phpunit
    - PHP_VERSION: 5.6
      DB_TYPE: postgres
      TEST_SUITE: phpunit
    # - PHP_VERSION: 5.6
    #   DB_TYPE: oracle
    #   TEST_SUITE: phpunit

    # PHP 7.0
    - PHP_VERSION: 7.0
      DB_TYPE: sqlite
      TEST_SUITE: phpunit
    #- PHP_VERSION: 7.0
    #  DB_TYPE: mariadb
    #  TEST_SUITE: phpunit
    - PHP_VERSION: 7.0
      DB_TYPE: mysql
      TEST_SUITE: phpunit
    - PHP_VERSION: 7.0
      DB_TYPE: mysqlmb4
      TEST_SUITE: phpunit
    #- PHP_VERSION: 7.0
    #  DB_TYPE: postgres
    #  TEST_SUITE: phpunit
    # - PHP_VERSION: 7.0
    #   DB_TYPE: oracle
    #   TEST_SUITE: phpunit

    # PHP 7.1
    - PHP_VERSION: 7.1
      DB_TYPE: sqlite
      TEST_SUITE: phpunit
    #- PHP_VERSION: 7.1
    #  DB_TYPE: mariadb
    #  TEST_SUITE: phpunit
    #- PHP_VERSION: 7.1
    #  DB_TYPE: mysql
    #  TEST_SUITE: phpunit
    #- PHP_VERSION: 7.1
    #  DB_TYPE: postgres
    #  TEST_SUITE: phpunit
    # - PHP_VERSION: 7.1
    #   DB_TYPE: oracle
    #   TEST_SUITE: phpunit

    # PHP 7.2
    - PHP_VERSION: 7.2
      DB_TYPE: sqlite
      TEST_SUITE: phpunit
    #- PHP_VERSION: 7.2
    #  DB_TYPE: mariadb
    #  TEST_SUITE: phpunit
    #- PHP_VERSION: 7.2
    #  DB_TYPE: mysql
    #  TEST_SUITE: phpunit
    #- PHP_VERSION: 7.2
    #  DB_TYPE: postgres
    #  TEST_SUITE: phpunit
    # - PHP_VERSION: 7.2
    #   DB_TYPE: oracle
    #   TEST_SUITE: phpunit
#
#    # Integration
#    - PHP_VERSION: 7.1
#      DB_TYPE: sqlite
#      TEST_SUITE: integration

    # Code Coverage Computation
    - PHP_VERSION: 7.1
      DB_TYPE: sqlite
      TEST_SUITE: coverage

    - PHP_VERSION: 7.1
      DB_TYPE: mysql
      TEST_SUITE: coverage

    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: other
      DB_TYPE: mariadb
      USE_SERVER: true
      
    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: files
      DB_TYPE: mariadb
      USE_SERVER: true

    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: moveFilesFolders
      DB_TYPE: mariadb
      USE_SERVER: true
    
    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: renameFiles
      DB_TYPE: mariadb
      USE_SERVER: true
    
    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: renameFolders
      DB_TYPE: mariadb
      USE_SERVER: true
    
    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: trashbin
      DB_TYPE: mariadb
      USE_SERVER: true
    
    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: sharingInternalGroupsUsers
      DB_TYPE: mariadb
      USE_SERVER: true
    
    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: sharingExternalOther
      DB_TYPE: mariadb
      USE_SERVER: true
      USE_FEDERATED_SERVER: true
    
    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: restrictSharing
      DB_TYPE: mariadb
      USE_SERVER: true
      
    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: upload
      DB_TYPE: mariadb
      USE_SERVER: true
back to top