-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
82 lines (70 loc) · 3.02 KB
/
.travis.yml
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
language: php
sudo: false
php:
- 5.5
- 5.6
- 7.0
- 7.1
- nightly
matrix:
fast_finish: true
allow_failures:
- php: 7.0
- php: 7.1
- php: nightly
services:
- mysql
before_install:
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]]; then phpenv config-rm xdebug.ini; fi;
# load memcache.so for php 5
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]] && [ $(php -r "echo PHP_MAJOR_VERSION;") == 5 ]; then (pecl install -f memcached-2.1.0 && echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini) || echo "Continuing without memcache extension"; fi;
# load memcache.so for php >= 7.1
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]] && [ $(php -r "echo PHP_MAJOR_VERSION;") == 7 ] && [ $(php -r "echo PHP_MINOR_VERSION;") >= 1 ]; then (pecl install -f memcached-2.1.0 && echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini) || echo "Continuing without memcache extension"; fi;
# Set the COMPOSER_ROOT_VERSION to the right version according to the branch being built
- if [ "$TRAVIS_BRANCH" = "master" ]; then export COMPOSER_ROOT_VERSION=dev-master; else export COMPOSER_ROOT_VERSION="$TRAVIS_BRANCH".x-dev; fi;
- composer self-update
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;
- mysql -e 'create database zk_test;'
install:
- composer install
- zip -qr RKDownLoadModule.zip .
- wget https://github.com/zikula/core/releases/download/1.5.5/Zikula_Core-1.5.5.tar.gz
- tar -xpzf Zikula_Core-1.5.5.tar.gz
- rm Zikula_Core-1.5.5.tar.gz
- cd 1.5
- php app/console zikula:install:start -n --database_user=root --database_name=zk_test --password=12345678 [email protected] --router:request_context:host=localhost
- php app/console zikula:install:finish
- cd modules
- mkdir rk
- cd rk
- mkdir download-module
- cd download-module
- unzip -q ../../../../RKDownLoadModule
- cd ../../..
- php app/console bootstrap:bundles
- mysql -e "INSERT INTO zk_test.modules (id, name, type, displayname, url, description, directory, version, capabilities, state, securityschema, core_min, core_max) VALUES (NULL, 'RKDownLoadModule', '3', 'Down load', 'download', 'a simple Download App', 'rk/download-module', '0.7.0', 'N;', '3', 'N;', '1.5.5', '3.0.0');"
- php app/console cache:warmup
script:
- php app/console lint:yaml modules/rk/download-module/Resources
- php app/console lint:twig @RKDownLoadModule
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
before_deploy:
- cd ..
- mkdir release
- cd release
- unzip -q ../RKDownLoadModule.zip
- rm -Rf vendor
- rm -Rf .git
- composer install --no-dev --prefer-dist
- rm auth.json
- zip -qr RKDownLoadModule.zip .
deploy:
provider: releases
api_key:
secure: "" # Enter your api key here!
file: RKDownLoadModule.zip
on:
tags: true
repo: rK/DownLoad