Welcome to mirror list, hosted at ThFree Co, Russian Federation.

.travis.yml - github.com/nextcloud/passman.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3adf73ac81fae1c1bf5d5e3d0d64ddee56748cb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
language: php
php:
    - 7.1
    - 7.2
env:
    global:
        - CORE_BRANCH=master
        - APP_NAME=passman
        - SERVER_FOLDER=server
        - CLOUD=nextcloud
        - SERVER=nextcloud/travis_ci/master
    matrix:
        - DB=mysql
        - DB=sqlite

#fixes mysqlerrors
dist: precise

branches:
  only:
    - master
    - fix_layout_for_14


services:
  # enable a display for running JavaScript tests
  - xvfb


  # enable a display for running JavaScript tests
    #- export DISPLAY=:99.0
   # - sh -e /etc/init.d/xvfb start
   # - if [[ "$DB" == 'mysql' ]]; then sudo apt-get -y install mariadb-server; fi
    - if [[ "$DB" == 'mysql' ]]; then sudo apt-get -y install mariadb-server; fi
    # - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
    - wget https://raw.githubusercontent.com/$SERVER/before_install.sh
    - . ./before_install.sh "$APP_NAME" "$CORE_BRANCH" "$DB"
     # Add some output debugging information
    - cd ../${SERVER_FOLDER}
    - ./occ check
    - ./occ status
    - ./occ app:list
    - ./occ app:enable $APP_NAME
    - nvm install 7.0
    - npm install -g npm@latest
    - sh -c "if [ '$JSTESTS' = '1' ]; then npm install grunt-cli -g; fi"

#
before_script:
#    - 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

    - php -S localhost:8080 &
    - cd apps/$APP_NAME/
    - sh -c "if [ '$CLOUD' = 'nextcloud' ]; then cp /home/travis/build/nextcloud/server/composer.json .; fi;"
    - mkdir -p build
    - curl -sSL https://phar.phpunit.de/phpunit-5.7.phar -o build/phpunit.phar

    #- sh -c "if [ '$JSTESTS' != '1' ]; then composer require codacy/coverage -vvv; fi"
    - sh -c "if [ '$JSTESTS' != '1' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi"
    - sh -c "if [ '$JSTESTS' = '1' ]; then npm install; fi"
#    - ./occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database $DB --database-pass=''


script:
    # Test the app
    - sh -c "if [ '$JSTESTS' != '1' ]; then find . -name \*.php -exec php -l \"{}\" \;; fi"
    - cd ../../
    # - sh -c "if [ '$JSTESTS' != '1' ]; then ./occ app:check-code $APP_NAME -c private -c strong-comparison; fi"
    # - sh -c "if [ '$JSTESTS' != '1' ]; then ./occ app:check-code $APP_NAME -c deprecation; fi"
    - cd apps/$APP_NAME/

    - sh -c "if [ '$JSTESTS' != '1' ]; then php build/phpunit.phar -v -c phpunit.xml --coverage-clover=coverage.clover --coverage-php=phpunit; fi"


    # Create coverage report
    #- sh -c "if [ '$JSTESTS' != '1' ]; then php vendor/bin/codacycoverage -v clover coverage.clover; fi"
    - sh -c "if [ '$JSTESTS' != '1' ]; then php ocular.phar code-coverage:upload --access-token="$SCRUTINIZER_TOKEN" --format=php-clover coverage.clover; fi"


    -  sh -c "if [ '$JSTESTS' = '1' ]; then grunt jshint; fi"
    -  sh -c "if [ '$JSTESTS' = '1' ]; then grunt karma; fi"


#after_failure:
#    - cat ../../data/owncloud.log

addons:
    firefox: "latest"

matrix:
  include:
    - php: 7.1
      env: DB=mysql;
    - php: 7.1
      env: DB=mysql;JSTESTS=1;
    - php: 7.2
      env: DB=mysql;
    - php: 7.2
      env: DB=mysql;JSTESTS=1;
  allow_failures:
    - env: DB=sqlite;CODECHECK=2