-
Notifications
You must be signed in to change notification settings - Fork 15
/
.travis.yml
125 lines (102 loc) · 3.64 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
# This file is part of the Kreta package.
#
# (c) Beñat Espiña <[email protected]>
# (c) Gorka Laucirica <[email protected]>
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
sudo: false
addons:
ssh_known_hosts:
- 137.74.161.60
language: php
php:
- 7.1
env:
- COMPOSER_OPTIONS="--no-interaction --prefer-source"
before_install:
- phpenv config-rm xdebug.ini
- composer self-update
- pip install --user -U pip
- pip install --user --upgrade pip
- pip install --user --upgrade ansible
- printf '[defaults]\nroles_path=../' >ansible.cfg
- ansible --version
- ansible-galaxy install carlosbuenosvinos.ansistrano-deploy --force
- ln -s `pwd` ../kreta.Kreta
- ENCRYPTED_KEY_VAR="encrypted_${SSH_ENCRYPTION_KEY}_key"
- ENCRYPTED_IV_VAR="encrypted_${SSH_ENCRYPTION_KEY}_iv"
- ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR}
- ENCRYPTED_IV=${!ENCRYPTED_IV_VAR}
- openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in .travis/deploy_rsa.enc -out /tmp/deploy_rsa -d
- eval "$(ssh-agent -s)"
- chmod 600 /tmp/deploy_rsa
- ssh-add /tmp/deploy_rsa
install:
- nvm install 8
- nvm use 8
- npm install -g yarn
- cd SharedKernel
- composer install
- cd -
- cd IdentityAccess
- composer install
- 'sed -i -e "s/identity_access_database_password:.*/identity_access_database_password: null/" parameters.yml'
- sh etc/bash/generate_ssh_keys.sh
- cd -
- cd TaskManager
- composer install
- 'sed -i -e "s/task_manager_database_password:.*/task_manager_database_password: null/" parameters.yml'
- cd -
- cd Notifier
- composer install
- cd -
- cd CompositeUi
- yarn install
- sh etc/bash/update_graph_schema.sh
- cd -
- sh etc/bash/install_test_env.sh
cache:
yarn: true
directories:
- node_modules
- $HOME/.composer/cache/files
- $HOME/.php-cs-fixer
- $HOME/virtualenv
script:
- cd SharedKernel
- vendor/bin/phpspec run -fdot
- vendor/bin/php-cs-fixer fix --config=etc/phpcs/.php_cs --diff --dry-run -v
- vendor/bin/php-cs-fixer fix --config=etc/phpcs/.phpspec_cs --diff --dry-run -v
- cd -
- cd IdentityAccess
- vendor/bin/phpspec run -fdot
- vendor/bin/php-cs-fixer fix --config=etc/phpcs/.php_cs --diff --dry-run -v
- vendor/bin/php-cs-fixer fix --config=etc/phpcs/.phpspec_cs --diff --dry-run -v
- etc/bin/symfony-console lint:yaml src/Kreta/IdentityAccess/Infrastructure
- cd -
- cd TaskManager
- vendor/bin/phpspec run -fdot
- vendor/bin/phpunit
- vendor/bin/php-cs-fixer fix --config=etc/phpcs/.php_cs --diff --dry-run -v
- vendor/bin/php-cs-fixer fix --config=etc/phpcs/.phpspec_cs --diff --dry-run -v
- etc/bin/symfony-console lint:yaml src/Kreta/TaskManager/Infrastructure
- cd -
- cd Notifier
- vendor/bin/phpspec run -fdot
- vendor/bin/php-cs-fixer fix --config=etc/phpcs/.php_cs --diff --dry-run -v
- vendor/bin/php-cs-fixer fix --config=etc/phpcs/.phpspec_cs --diff --dry-run -v
- etc/bin/symfony-console lint:yaml src/Kreta/Notifier/Infrastructure
- cd -
- cd CompositeUi
- node_modules/.bin/eslint -c .eslintrc.js src/
- node_modules/.bin/prettier "src/**/*.js" --list-different --single-quote --no-bracket-spacing --trailing-comma all
- node_modules/.bin/stylelint -c .stylelintrc.js src/scss/**/*.scss --syntax scss
- yarn test
- cd -
deploy:
skip_cleanup: true
provider: script
script: ansible-playbook -i etc/deploy/hosts etc/deploy/deploy.yml
on:
branch: master