forked from Automattic/jetpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
151 lines (133 loc) · 4.37 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# 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"
# 7.4 can not be included here until 5.3 is the "previous" version of WP.
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:
fast_finish: true
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"
# Disable for now until we fix all the spelling issues
# - name: "Spell check Markdown files"
# if: branch !~ /(^branch-.*-built)/
# language: node_js
# env: WP_TRAVISCI="yarn test-spelling"
- php: "nightly"
name: "PHP Nightly"
- php: "7.4snapshot"
env: WP_BRANCH=master SIMPLE_AND_MULTISITE=1
# add a new entry for "latest" WP once 5.3 has shipped. Remove snapshot once 7.4 is GA.
# Code Climate code coverage.
- php: "7.3"
name: "Code Coverage"
env:
- WP_BRANCH=previous
- DO_COVERAGE=true
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- export PLUGIN_SLUG=$(basename $(pwd))
- ./tests/setup-travis.sh
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT -t clover -p /tmp/wordpress-previous/src/wp-content/plugins/jetpack
- php: "7.0"
name: "E2E tests"
if: branch !~ /(^branch-.*-built)/ AND env(RUN_E2E) = true
before_script:
# Enable user namespace cloning
- "sysctl kernel.unprivileged_userns_clone=1"
- nvm install
- yarn && yarn build-production
- ./tests/e2e/bin/setup-e2e-travis.sh
- yarn test-decrypt-config
script:
- yarn test-e2e --runInBand --verbose
addons:
apt:
packages:
- nginx
# This is required to run new chrome on old trusty
- libnss3
- php: "7.0"
name: "Legacy full sync"
env: LEGACY_FULL_SYNC=1 WP_BRANCH=latest
allow_failures:
- name: "E2E tests"
- name: "PHP Nightly"
- name: "Spell check Markdown files"
- name: "Code Coverage"
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"
- ./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:
- enej.bajgoric@automattic.com
- georgestephanis@automattic.com
- miguel@automattic.com
- rocco@automattic.com
- smart@automattic.com
- eric.binnion@automattic.com
- allendav@automattic.com
- beau@automattic.com
# Encrypted Slack notification address
- secure: "WQdTdmYuifSW0hiJGXpQGKystMASC50QvxHlyUL5SM3h5GP8aCgeSsHuXvKPe3dT3Pffhk0dSHBfDtdWFwSHW/upURhg0vs4dm7+nxxvGZiTPzKcuAIjgvCoqWM7teyda/XqFGNSnv+XsT34uoyPhhFgd45T3oS+QQ3aNCruFak="
addons:
code_climate:
repo_token: 683bd559e5214ca3b721092af177893f05765ba90d2589fcf35d7e85c6ea01e8