language: php env: global: - CORE_BRANCH=stable19 - APP_NAME=ransomware_detection - KRANKERL_VERSION=0.12.3 services: - mysql - postgresql branches: only: - master - develop - /^feature.*$/ before_install: - wget https://github.com/ChristophWurst/krankerl/releases/download/v${KRANKERL_VERSION}/krankerl_${KRANKERL_VERSION}_amd64.deb - sudo dpkg -i krankerl_${KRANKERL_VERSION}_amd64.deb - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - . ./before_install.sh $APP_NAME $CORE_BRANCH $DB - cd ../server - ./occ check - ./occ status - ./occ app:enable $APP_NAME - ./occ app:list - composer install jobs: fast_finish: true allow_failures: - env: "CHECKSTYLE=2" include: - stage: test php: 7.2 env: - DB=mysql script: - cd apps/$APP_NAME/ - phpunit --configuration phpunit.xml - stage: test php: 7.2 env: - DB=pgsql script: - cd apps/$APP_NAME/ - phpunit --configuration phpunit.xml - stage: test php: 7.2 env: - DB=mysql script: - cd apps/$APP_NAME/ - phpunit --configuration phpunit.xml - stage: test php: 7.2 env: - DB=mysql - CHECKSTYLE=1 script: - ./occ app:check-code $APP_NAME -c private -c strong-comparison - stage: test php: 7.2 env: - DB=mysql - CHECKSTYLE=2 script: - ./occ app:check-code $APP_NAME -c deprecation - stage: report php: 7.2 env: - DB=sqlite script: - cd tests - wget https://codecov.io/bash -O codecov.sh - bash codecov.sh - stage: build php: 7.2 env: - DB=sqlite script: - cd apps/$APP_NAME/ - krankerl package - stage: deploy deploy: provider: releases api_key: $GITHUB_TOKEN file: apps/$APP_NAME/build/artifacts/ransomware_detection.tar.gz skip_cleanup: true draft: true stages: - test - report - build - deploy