This repository has been archived by the owner on May 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
114 lines (98 loc) · 2.92 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
# Travis CI Configuration File
language: php
sudo: false
cache:
apt: true
bundler: true
directories:
- vendor
- $HOME/.composer/cache
- node_modules
_envs:
- &stage_unit
before_install:
- bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 $WP_VERSION
before_script:
- composer install --no-interaction --prefer-dist
script:
- phpunit
jobs:
fast_finish: true
include:
# phpmd + phpcs
- stage: lint
php: 7.0
before_script:
- composer install --no-interaction --prefer-dist
script:
- vendor/bin/phpmd classes text codesize,naming,unusedcode
- vendor/bin/phpcs -n --report=emacs --standard=phpcs.ruleset.xml
# jshint
- stage: lint
php: 7.0
before_install:
- cd $TRAVIS_BUILD_DIR
- npm --version
- node --version
- nvm install 6.9.1
- npm install -g grunt-cli
- npm install
- npm prune
- node --version
- npm --version
- grunt --version
script:
- grunt jshint
# Unit tests for PHP 5.4-7.2
- stage: unit
php: 7.2
env: WP_VERSION=nightly
<<: *stage_unit
- stage: unit
php: 7.1
env: WP_VERSION=latest
<<: *stage_unit
- stage: unit
php: 7.1
env: WP_VERSION=nightly
<<: *stage_unit
- stage: unit
php: 7.0
env: WP_VERSION=nightly
<<: *stage_unit
- stage: unit
php: 5.6
env: WP_VERSION=nightly
<<: *stage_unit
- stage: unit
php: 5.5
env: WP_VERSION=nightly
<<: *stage_unit
- stage: unit
php: 5.4
env: WP_VERSION=nightly
<<: *stage_unit
# Code coverage
- stage: coverage
php: 7.0
before_install:
- bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 $WP_VERSION
before_script:
- composer install --no-interaction --prefer-dist
script:
- phpunit --coverage-clover build/logs/clover.xml
after_script:
- bash <(curl -s https://codecov.io/bash)
stages:
- lint
- unit
- name: coverage
if: branch = master
notifications:
email: false
slack:
rooms:
secure: XK3DU/7AhU/Wg84DRaGGh5XzVzqcTFlQYhDvdA3/29aLj6CVGEfuIKiuDhMsdIr0+lZRWMu3waFIWS9G277hwl1ff+uDB5ptx4/J7sYKK8UmhW7KMWBzg2dkBDdIN9oC8cY2l3Zfe+an/6yHoCL7xc5PeWZFzzvXdo426z/fGl4TJmdpukhAghhWS9FwlIN7IpiIl5sfy6kIk00vp55OU1I220MuHLrV44DaVOkXoa0LHLaw1ovnyFMS1gRNGjtzCtsd78lO6ddiYkJf6fTYC7+H3Kt0FX0wGW+WhlscEaG9rBrB0CRT9KLqB3UUsuc5hRy7+NHOM584RkiyH9I7+aFOgJTeeFIOiwi9eQU3q9soBJLq6B7TL8CMg4mfV+mSFnvsxhPzHhCEjO1ohzBUriPt/8xw5ku8aMP2coxXhAR9j/6bcpF0zp2Q2iImvU32Fy84dtU9ANu+KFN83KADtIA9qBrgGfTKkboLQ5JMJuNhmp/YC6p2PDWfpyMP35+VYLgqy9XgyUixbFt24i/wUJHouMVblsS4dgAJ6ZvoJUUbYoiDxV8imQkCh2HzhSjv1d2/xi7duDS0gAfUVqHxXyCh4Hddt5g3xSHekzEIKv5tIr+/SO2FtfYePeCmdVzcV4H9Wb/WzOB3zctaVmt9HenWwrMj6OYd8kLnTOVWjbc=
on_start: never
on_failure: always
on_success: change