cloud_bbb/.travis.yml

85 lines
1.9 KiB
YAML
Raw Normal View History

2020-04-29 11:08:49 +02:00
dist: bionic
2020-06-18 11:21:26 +02:00
language: php
php:
- 7.2
- 7.3
- 7.4
services:
- mysql
- postgresql
env:
global:
2020-09-28 20:30:22 +02:00
- CORE_BRANCH=stable20
2020-06-18 11:21:26 +02:00
- DB=mysql
- LINT=false
matrix:
include:
- php: 7.3
2020-09-28 20:30:22 +02:00
env: DB=sqlite
2020-06-18 11:21:26 +02:00
- php: 7.4
2020-09-28 20:30:22 +02:00
env: DB=sqlite
2020-06-18 11:21:26 +02:00
- php: 7.3
2020-09-28 20:30:22 +02:00
env: DB=pgsql
2020-06-18 11:21:26 +02:00
- php: 7.4
2020-09-28 20:30:22 +02:00
env: DB=pgsql
2020-06-18 11:21:26 +02:00
- php: 7.3
2020-09-28 20:30:22 +02:00
env: LINT=true
- php: 7.2
env: DB=sqlite CORE_BRANCH=stable19
2020-06-18 11:21:26 +02:00
- php: 7.3
2020-09-28 20:30:22 +02:00
env: CORE_BRANCH=stable18
2020-06-18 11:21:26 +02:00
- php: 7.4
2020-09-28 20:30:22 +02:00
env: CORE_BRANCH=master
2020-06-18 11:21:26 +02:00
- php: nightly
2020-09-28 20:30:22 +02:00
env: DB=sqlite
2020-06-18 11:21:26 +02:00
fast_finish: true
allow_failures:
- php: nightly
- php: 7.4
env: "CORE_BRANCH=master"
2020-04-29 11:08:49 +02:00
cache:
yarn: true
directories:
2020-06-18 16:02:27 +02:00
- "$HOME/core/apps/bbb/node_modules"
2020-06-18 11:21:26 +02:00
- "$HOME/.composer/cache/files"
- "$HOME/.npm"
2020-04-29 11:08:49 +02:00
2020-06-18 11:21:26 +02:00
#before_script: phpenv global 7.3
2020-04-29 11:08:49 +02:00
2020-06-18 11:21:26 +02:00
before_install:
- php --info
# Set up DB
- if [[ "$DB" == 'pgsql' ]]; then createuser -U travis -s oc_autotest; fi
- if [[ "$DB" == 'mysql' ]]; then mysql -u root -e 'create database oc_autotest;'; fi
- if [[ "$DB" == 'mysql' ]]; then mysql -u root -e "CREATE USER 'oc_autotest'@'localhost' IDENTIFIED BY '';"; fi
- if [[ "$DB" == 'mysql' ]]; then mysql -u root -e "GRANT ALL ON oc_autotest.* TO 'oc_autotest'@'localhost';"; fi
- composer self-update
2020-04-29 11:08:49 +02:00
- yarn install
- yarn composer:install:dev
2020-06-18 11:21:26 +02:00
- cd ..
- git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b $CORE_BRANCH core
- mv cloud_bbb core/apps/bbb
before_script:
# Set up core
- php -f core/occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database $DB --database-pass=''
# Set up app
- php -f core/occ app:enable bbb
# Enable app twice to check occ errors of registered commands
- php -f core/occ app:enable bbb
- cd core/apps/bbb
script:
- php -v
- yarn test
- if [[ "$LINT" = 'true' ]]; then yarn lint; fi
- if [[ "$LINT" = 'true' ]]; then yarn commitlint-travis; fi