forked from passbolt/passbolt_api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
131 lines (112 loc) · 3.74 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
language: php
dist: bionic
sudo: required
#services:
# - postgresql
env:
global:
- APP_FULL_BASE_URL=http://127.0.0.1
- DEBUG=1
- DATASOURCES_TEST_USERNAME=root
- DATASOURCES_TEST_PASSWORD=""
- DATASOURCES_TEST_DATABASE=passbolt_test
- PASSBOLT_GPG_KEYRING=/home/travis/.gnupg
- PASSBOLT_GPG_SERVER_KEY_FINGERPRINT=2FC8945833C51946E937F9FED47B0811573EE67E
- PASSBOLT_GPG_SERVER_KEY_PUBLIC=config/gpg/unsecure.key
- PASSBOLT_GPG_SERVER_KEY_PRIVATE=config/gpg/unsecure_private.key
- PASSBOLT_REGISTRATION_PUBLIC=1
- PASSBOLT_SELENIUM_ACTIVE=1
addons:
apt:
packages: &common_pkg
- libgpgme11-dev
- gnupg2
matrix:
fast_finish: true
include:
# PHP 7.1 - MARIADB 10.1
- php: 7.1
env: PHPUNIT=1 COVERAGE=1 DB=mariadb DB_VERSION=10.1
addons: &php7_addon
mariadb: '10.1'
apt:
packages:
- *common_pkg
# PHP 7.1 - MYSQL 5.7
- php: 7.1
env: PHPUNIT=1 DB=mysql DB_VERSION=5.7
services:
- mysql
addons: &php7_addon
apt:
packages:
- *common_pkg
# PHP 7.2 - MARIADB 10.1
- php: 7.2
env: PHPUNIT=1 DB=mariadb DB_VERSION=10.1
addons: &php7_addon
mariadb: '10.1'
apt:
packages:
- *common_pkg
# PHP 7.1 - MARIADB 10.2
- php: 7.1
env: PHPUNIT=1 DB=mariadb DB_VERSION=10.2
addons: &php7_addon
mariadb: '10.2'
apt:
packages:
- *common_pkg
# PHP 7.3 - MARIADB 10.3
- php: 7.3
env: PHPUNIT=1 DB=mariadb DB_VERSION=10.3
addons: &php7_addon
mariadb: '10.3'
apt:
packages:
- *common_pkg
# PHP 7.1 - POSTGRESQL 9.2
# - php: 7.1
# env: PHPUNIT=1 DB=postgresql DB_VERSION=9.2 DATASOURCES_TEST_DRIVER=Postgres DATASOURCES_TEST_USERNAME=postgres DATASOURCES_TEST_PORT=5432
# addons: *php7_addon
# PHP 7.1 - POSTGRESQL 9.4
# - php: 7.1
# env: PHPUNIT=1 DB=postgresql DB_VERSION=9.4 DATASOURCES_TEST_DRIVER=Postgres DATASOURCES_TEST_USERNAME=postgres DATASOURCES_TEST_PORT=5432
# addons:
# postgresql: "9.4"
# apt:
# packages:
# - *common_pkg
# PHPCS
- php: 7.3
env: PHPCS=1 PHPUNIT=1 DB=mariadb DB_VERSION=10.3
addons: &php7_addon
mariadb: '10.3'
apt:
packages:
- *common_pkg
# allow_failures:
# # PHP 7.1 - POSTGRESQL 9.2
# - php: 7.1
# env: PHPUNIT=1 DB=postgresql DB_VERSION=9.2 DATASOURCES_TEST_DRIVER=Postgres DATASOURCES_TEST_USERNAME=postgres DATASOURCES_TEST_PORT=5432
#
# # PHP 7.1 - POSTGRESQL 9.4
# - php: 7.1
# env: PHPUNIT=1 DB=postgresql DB_VERSION=9.4 DATASOURCES_TEST_DRIVER=Postgres DATASOURCES_TEST_USERNAME=postgres DATASOURCES_TEST_PORT=5432
before_script:
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE IF NOT EXISTS passbolt_test;'; fi"
- sh -c "if [ '$DB' = 'mariadb' ]; then mysql -e 'CREATE DATABASE IF NOT EXISTS passbolt_test;'; fi"
# - sh -c "if [ '$DB' = 'postgresql' ]; then psql -c 'DROP DATABASE IF EXISTS passbolt_test;' -U postgres; fi"
# - sh -c "if [ '$DB' = 'postgresql' ]; then psql -c 'CREATE DATABASE passbolt_test;' -U postgres; fi"
- composer global require hirak/prestissimo
- composer install --no-interaction
- echo yes | pecl install gnupg
- gpg --import config/gpg/unsecure_private.key
script:
- if [[ $PHPCS = 1 ]]; then composer cs-check; fi
- if [[ $PHPUNIT = 1 && $COVERAGE != 1 ]]; then vendor/bin/phpunit; fi
- if [[ $PHPUNIT = 1 && $COVERAGE = 1 ]] ; then vendor/bin/phpunit --coverage-clover build/logs/clover.xml; fi
after_success:
- if [[ $COVERAGE = 1 ]] ; then bash <(curl -s https://codecov.io/bash); fi
notifications:
email: false