Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Testing with Travis #17

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
language: php
php:
- 5.6
- 7.0
- 7.1
- 7.2

env:
global:
- CORE_BRANCH=master
- APP_NAME=files_external_dropbox
matrix:
- DB=sqlite

branches:
only:
- master
- /^stable\d+(\.\d+)?$/

before_install:
- composer install
- wget https://raw.githubusercontent.com/owncloud/administration/master/travis-ci/before_install.sh
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB

# Add some output debugging information
- cd ../core
- ./occ check
- ./occ status
- ./occ app:list

script:
- ./occ app:enable files_external_dropbox
- cd apps/$APP_NAME/

# Test the app
- vendor/bin/parallel-lint --exclude vendor .
- cd ../../
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' = '1' ]; then ./occ app:check-code $APP_NAME -c private -c strong-comparison; fi"
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' = '2' ]; then ./occ app:check-code $APP_NAME -c deprecation; fi"
- cd apps/$APP_NAME/

# Run phpunit tests
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then ../../lib/composer/bin/phpunit --configuration phpunit.xml; fi"

# Create coverage report
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then vendor/bin/ocular code-coverage:upload --format=php-clover clover.xml; fi"

# Build the app package
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then make clean dist; fi"

# Run Javascript unit tests
# - cd tests/js
# - sh -c "if [ '$JSTESTS' = '1' ]; then npm install --deps; node_modules/karma/bin/karma start karma.config.js --single-run; fi"
# - cd ../

matrix:
include:
- php: 5.6
env: DB=mysql
- php: 5.6
env: DB=mysql CORE_BRANCH=stable10
- php: 5.6
env: DB=pgsql
- php: 5.6
env: DB=mysql;CODECHECK=1
- php: 5.6
env: DB=mysql;CODECHECK=2
allow_failures:
- php: 7.2
- env: DB=mysql;CODECHECK=1
- env: DB=mysql;CODECHECK=2
fast_finish: true
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
],
"require": {
"kunalvarma05/dropbox-php-sdk": "dev-guzzle5",
"hemant-mann/flysystem-dropbox": "dev-guzzle5"
"hemant-mann/flysystem-dropbox": "dev-guzzle5",
"tightenco/collect": "v5.4.33"
},
"require-dev": {
"scrutinizer/ocular": "^1.3",
"jakub-onderka/php-parallel-lint": "^0.9.2",
"jakub-onderka/php-console-highlighter": "^0.3.2"
}
}
Loading