https://github.com/owncloud/core
Raw File
Tip revision: 633eb080206419e865f4f6bf3e5582787f564a9b authored by Patrick Jahns on 08 March 2018, 21:42:43 UTC
run files_external tests with owncloud 10
Tip revision: 633eb08
.drone.yml
workspace:
  base: /drone
  path: src

branches: [master, stable10, stable9.1, stable9]

clone:
  git:
    image: plugins/git
    depth: 50

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]

  yarn:
    image: owncloudci/nodejs:latest
    pull: true
    commands:
      - ./tests/drone/yarn-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]

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

  codecov:
    image: plugins/codecov:2
    secrets: [codecov_token]
    pull: true
    files:
     - '*.xml'
    paths:
     - tests/output/coverage
    when:
      event: [push, pull_request]
      matrix:
        COVERAGE: true

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

  install-server:
    image: owncloudci/php:${PHP_VERSION}
    pull: true
    commands:
      - ./tests/drone/install-server.sh
      - 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

  webui-acceptance-tests:
    image: owncloudci/php:${PHP_VERSION}
    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/acceptance/webUISkeleton
      - 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

  print-log:
    image: owncloudci/php:${PHP_VERSION}
    pull: true
    commands:
      - cat /drone/src/data/owncloud.log
    when:
      status:  [ failure ]
      matrix:
        TEST_SUITE: phpunit

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: deepdiver/docker-oracle-xe-11g
    environment:
       - ORACLE_USER=system
       - ORACLE_PASSWORD=oracle
       - 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:${PHP_VERSION}
    pull: true
    environment:
      - APACHE_WEBROOT=/drone/src/
    command: [ "/usr/local/bin/apachectl", "-e", "debug" , "-D", "FOREGROUND" ]
    when:
      matrix:
        USE_SERVER: true

  federated:
    image: owncloudci/php:${PHP_VERSION}
    pull: true
    environment:
      - APACHE_WEBROOT=/drone/src/
    command: [ "/usr/local/bin/apachectl", "-e", "debug" , "-D", "FOREGROUND" ]
    when:
      matrix:
        USE_FEDERATED_SERVER: true

  apache_webdav:
    image: owncloudci/php
    pull: true
    environment:
     - APACHE_CONFIG_TEMPLATE=webdav
    command: [ "apachectl", "-D", "FOREGROUND" ]
    when:
      matrix:
        FILES_EXTERNAL_TYPE: webdav_apache

  owncloud_external:
    image: owncloud/server
    pull: true
    when:
      matrix:
        FILES_EXTERNAL_TYPE: webdav_owncloud

matrix:
  include:

  # frontend
    - TEST_SUITE: javascript
      PHP_VERSION: 7.1

  # Unit Tests
    - PHP_VERSION: 7.1
      DB_TYPE: mysql
      TEST_SUITE: phpunit
      COVERAGE: true

    - PHP_VERSION: 7.1
      DB_TYPE: mysqlmb4
      TEST_SUITE: phpunit

#    - PHP_VERSION: 7.1
#      DB_TYPE: mariadb
#      TEST_SUITE: phpunit

    - PHP_VERSION: 7.1
      DB_TYPE: postgres
      TEST_SUITE: phpunit
      COVERAGE: true

    - PHP_VERSION: 7.1
      DB_TYPE: oracle
      TEST_SUITE: phpunit
      COVERAGE: true

    - PHP_VERSION: 7.1
      DB_TYPE: sqlite
      TEST_SUITE: phpunit
      COVERAGE: true


    # 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

  # Files External
    - PHP_VERSION: 7.1
      TEST_SUITE: phpunit
      COVERAGE: true
      DB_TYPE: sqlite
      FILES_EXTERNAL_TYPE: webdav_apache

    - PHP_VERSION: 7.1
      TEST_SUITE: phpunit
      COVERAGE: true
      DB_TYPE: sqlite
      FILES_EXTERNAL_TYPE: webdav_owncloud

  # Ui Acceptance tests
    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: webUIFavorites
      DB_TYPE: mariadb
      USE_SERVER: true
      
    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: webUIManageUsersGroups
      DB_TYPE: mariadb
      USE_SERVER: true

    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: webUIManageQuota
      DB_TYPE: mariadb
      USE_SERVER: true

    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: webUIPersonalSettings
      DB_TYPE: mariadb
      USE_SERVER: true

    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: webUIFiles
      DB_TYPE: mariadb
      USE_SERVER: true

    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: webUIMoveFilesFolders
      DB_TYPE: mariadb
      USE_SERVER: true
    
    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: webUIRenameFiles
      DB_TYPE: mariadb
      USE_SERVER: true
    
    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: webUIRenameFolders
      DB_TYPE: mariadb
      USE_SERVER: true

    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: webUITrashbin
      DB_TYPE: mariadb
      USE_SERVER: true

    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: webUISharingInternalGroups
      DB_TYPE: mariadb
      USE_SERVER: true

    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: webUISharingInternalUsers
      DB_TYPE: mariadb
      USE_SERVER: true

    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: webUISharingExternal
      DB_TYPE: mariadb
      USE_SERVER: true
      USE_FEDERATED_SERVER: true
    
    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: webUIRestrictSharing
      DB_TYPE: mariadb
      USE_SERVER: true
      
    - PHP_VERSION: 7.1
      TEST_SUITE: selenium
      BEHAT_SUITE: webUIUpload
      DB_TYPE: mariadb
      USE_SERVER: true
back to top