Skip to content

Commit

Permalink
Add MariaDB testing on Travis
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
  • Loading branch information
ChristophWurst committed Mar 19, 2019
1 parent a3004df commit 78e8250
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ checks:

tools:
external_code_coverage:
runs: 4
runs: 5
timeout: 1200 # Timeout in seconds. 20 minutes
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@ matrix:
include:
- php: 7.2
env: "DB=sqlite SERVER_BRANCH=v16.0.0alpha1"
- php: 7.2
env: "DB=mysql"

env:
global:
- SERVER_BRANCH=master
matrix:
- DB=sqlite

addons:
mariadb: '10.1'

branches:
only:
- master
Expand All @@ -25,6 +30,9 @@ cache:
- "$HOME/.composer/cache/files"

before_install:
- php --version
- mysql --version

# Check out the Nextcloud server via git
- cd ..
- git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b $SERVER_BRANCH
Expand All @@ -33,6 +41,11 @@ before_install:
- mv twofactor_admin server/apps/

install:
# Install the db
- if [[ "$DB" == 'mysql' ]]; then mysql -u root -e 'create database nc_autotest;'; fi
- if [[ "$DB" == 'mysql' ]]; then mysql -u root -e "CREATE USER 'nc_autotest'@'localhost' IDENTIFIED BY '';"; fi
- if [[ "$DB" == 'mysql' ]]; then mysql -u root -e "GRANT ALL ON nc_autotest.* TO 'nc_autotest'@'localhost';"; fi

# Install the server
- php -f server/occ maintenance:install --database-name nc_autotest --database-user nc_autotest --admin-user admin --admin-pass admin --database $DB --database-pass=''

Expand Down
3 changes: 3 additions & 0 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
<category>security</category>
<bugs>https://github.com/ChristophWurst/twofactor_admin/issues</bugs>
<dependencies>
<php min-version="7.1" max-version="7.3"/>
<database>sqlite</database>
<database max-version="10.1">mysql</database>
<nextcloud min-version="16" max-version="16"/>
</dependencies>

Expand Down

0 comments on commit 78e8250

Please sign in to comment.