forked from benjaminkott/bootstrap_package
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
93 lines (81 loc) · 2.07 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
# .travis.yml
sudo: false
language: php
php:
- 7.0
- 7.1
- 7.2
env:
- TYPO3_VERSION=^8
- TYPO3_VERSION=^9
matrix:
exclude:
- php: 7.0
env: TYPO3_VERSION=^9
- php: 7.1
env: TYPO3_VERSION=^9
addons:
apt:
packages:
- parallel
install:
- composer require typo3/minimal:${TYPO3_VERSION}
- git checkout composer.json
- export TYPO3_PATH_WEB="$PWD/.build/web"
script:
- >
echo;
echo "Unit tests";
.build/vendor/phpunit/phpunit/phpunit -c Build/phpunit.xml
- >
echo;
echo "PHP lint";
find . -name \*.php ! -path "./.build/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;
jobs:
include:
- stage: quality
php: 7.2
script: ./.build/bin/php-cs-fixer --diff --dry-run -v fix
- stage: dependencies
php: 7.2
sudo: true
script:
- >
echo "Installing node_modules";
pushd Build;
yarn install;
- >
echo "Install grunt cli";
npm install -g grunt-cli;
- >
echo "Executing grunt";
pushd Build;
grunt build;
- stage: deploy
sudo: true
if: branch = master
addons:
ssh_known_hosts:
- bootstrap-package.com
script:
- >
openssl aes-256-cbc -K $encrypted_068845507e9d_key -iv $encrypted_068845507e9d_iv -in Build/deploy_rsa.enc -out /tmp/deploy_rsa -d;
eval "$(ssh-agent -s)";
chmod 600 /tmp/deploy_rsa;
ssh-add /tmp/deploy_rsa;
- >
curl -LO https://deployer.org/deployer.phar;
sudo mv deployer.phar /usr/local/bin/dep;
sudo chmod +x /usr/local/bin/dep;
- >
dep self-update;
- >
dep --file="./Build/deploy.php" deploy;
cache:
directories:
- $HOME/.composer/cache
notifications:
slack:
secure: fj3lIrSaDe0EzBu+Twng/3vz/Bn2bGtKhEA6hG2vBg1g+/n54l7uhzXjRWgMaI4gfwuBmDcJvPnG2EFweBuSJgQgxcXzCvScZ1Z4Xu+gAeCCCeuVJHsWE34erE86a5MeIAsDZhH2UG/MTOlpUqqdFCD59z5XA+E52LiyTp7QMi0=
on_success: change
on_failure: always