forked from ampproject/amp-wp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
74 lines (66 loc) · 2.23 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
# Tell Travis CI we're using PHP
language: php
# Using trusty instead of precise because we don't need PHP 5.2 or 5.3 anymore.
dist: trusty
addons:
apt:
packages:
# Needed for `xmllint`.
- libxml2-utils
notifications:
email:
on_success: never
on_failure: change
cache:
directories:
- $HOME/.composer/cache
- $HOME/.npm
- $HOME/.nvm/.cache
- $HOME/phpunit-bin
- $HOME/deployment-targets
install:
- nvm install 8.11.4 && nvm use 8.11.4
- composer install
- export DEV_LIB_PATH=vendor/xwp/wp-dev-lib/scripts
- source "$DEV_LIB_PATH/travis.install.sh"
- npx grunt shell:webpack_production
script:
- source "$DEV_LIB_PATH/travis.script.sh"
after_script:
- source "$DEV_LIB_PATH/travis.after_script.sh"
jobs:
include:
- stage: test
php: "7.3"
env: WP_VERSION=5.0
- php: "5.4"
env: WP_VERSION=4.9 DEV_LIB_SKIP=phpcs
- php: "5.5"
env: WP_VERSION=latest DEV_LIB_SKIP=phpcs
- php: "5.6"
env: WP_VERSION=4.9 DEV_LIB_SKIP=phpcs
- php: "5.6"
env: WP_VERSION=latest DEV_LIB_SKIP=phpcs
- php: "7.0"
env: WP_VERSION=latest DEV_LIB_SKIP=phpcs
- php: "7.1"
env: WP_VERSION=latest DEV_LIB_SKIP=phpcs
- php: "7.2"
env: WP_VERSION=latest DEV_LIB_SKIP=phpcs
- stage: deploy
if: type = push AND fork = false AND ( branch =~ ^[a-z][a-z0-9-]{0,10}$ OR branch =~ ^[0-9]+\.[0-9]+$ ) AND NOT branch IN ( live, test, dev, settings, team, support, debug, multidev, files, tags, billing )
php: "7.1"
env: WP_VERSION=latest DEV_LIB_ONLY=composer,grunt
script:
- |
eval "$(ssh-agent -s)"
pantheon_branch=$( echo $TRAVIS_BRANCH | sed 's/^\([0-9]\)/v\1/' | sed 's/[^a-z0-9-]/-/' )
echo "Initializing deployment to Pantheon branch: $pantheon_branch"
openssl aes-256-cbc -K $encrypted_7eb11f40d4e9_key -iv $encrypted_7eb11f40d4e9_iv -in bin/keys/id_rsa_ampconfdemo.enc -out bin/keys/id_rsa_ampconfdemo -d
chmod 600 bin/keys/id_rsa_ampconfdemo
./bin/deploy-travis-pantheon.sh \
ampconfdemo \
db7f3307-9808-4753-aaa4-acb387c94472 \
$(pwd)/bin/keys/id_rsa_ampconfdemo \
$pantheon_branch
after_script: skip