forked from Automattic/jetpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
111 lines (97 loc) · 2.97 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
# Travis CI Configuration File
# Tell Travis CI which distro to use
dist: trusty
# Tell Travis CI we're using PHP
language: php
# Run Matrix for these PHP versions
php:
- "5.6"
- "7.0"
- "7.2"
- "7.3"
env:
# Global variable is re-defined in matrix-include -list
global:
- WP_TRAVISCI=phpunit
# Run phpunit in Travis matrix for these combinations
matrix:
- WP_BRANCH=master SIMPLE_AND_MULTISITE=1 # SIMPLE_AND_MULTISITE is just a way to explicitly mention that we run both suites
- WP_BRANCH=latest
- WP_BRANCH=previous PHP_LINT=1
# Define a matrix of additional build configurations
# The versions listed above will automatically create our first configuration,
# so it doesn't need to be re-defined below.
matrix:
include:
- if: branch !~ /(^branch-.*-built)/
name: "JavaScript & CSS lint"
language: node_js
env: WP_TRAVISCI="yarn lint"
- if: branch !~ /(^branch-.*-built)/
name: "Danger CI, test dashboard & extensions"
language: node_js
env: WP_TRAVISCI="yarn test-dangerci-and-adminpage-and-extensions"
- if: branch !~ /(^branch-.*-built)/
name: "Build dashboard & extensions"
language: node_js
env: WP_TRAVISCI="yarn build"
- php: "7.3"
name: "E2E tests"
if: branch !~ /(^branch-.*-built)/ AND env(RUN_E2E) = true
before_script:
- nvm install
- yarn && yarn build
- bash tests/e2e/bin/setup-e2e-travis.sh jetpack_test root ''
- source ./env-file
- yarn test-decrypt-config
script: WP_BASE_URL=$WP_SITE_URL yarn test-e2e --runInBand
addons:
apt:
packages:
- nginx
allow_failures:
- name: "E2E tests"
cache:
directories:
- $HOME/.composer/cache/files
- $HOME/.cache/yarn
- $HOME/.phpbrew
# whitelist branches for the "push" build check
branches:
only:
- master
- master-stable
- /^branch-.*$/
- /^feature\/.*$/
# Git clone depth
# By default Travis CI clones repositories to a depth of 50 commits
git:
depth: 1
before_script:
- export PLUGIN_SLUG=$(basename $(pwd))
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- composer install
- ./tests/setup-travis.sh
script: ./tests/run-travis.sh
sudo: false
notifications:
webhooks:
urls:
- https://betadownload.jetpack.me/travis.php
on_success: always # Beta builder needs notifications for successful builds
email:
on_success: never # default: change
recipients:
# Encrypted Slack notification address
- secure: "WQdTdmYuifSW0hiJGXpQGKystMASC50QvxHlyUL5SM3h5GP8aCgeSsHuXvKPe3dT3Pffhk0dSHBfDtdWFwSHW/upURhg0vs4dm7+nxxvGZiTPzKcuAIjgvCoqWM7teyda/XqFGNSnv+XsT34uoyPhhFgd45T3oS+QQ3aNCruFak="
addons:
code_climate:
repo_token: 683bd559e5214ca3b721092af177893f05765ba90d2589fcf35d7e85c6ea01e8