-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (66 loc) · 1.69 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
language: php
notifications:
email:
on_success: never
on_failure: change
cache:
directories:
- $HOME/.composer/cache
matrix:
include:
- php: 7.4snapshot
env: WP_TRAVISCI=test-php
- php: 7.3
env: WP_TRAVISCI=test-php
- php: 7.2
env: WP_TRAVISCI=test-php
- php: 7.2
env: WP_TRAVISCI=test-js
- php: 7.2
env: WP_TRAVISCI=lint
- php: 7.3
env: WP_TRAVISCI=test-e2e
# Make sure NodeGit gets the correct C libs, copied from Gutenberg.
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libstdc++-4.9-dev
before_install:
- |
if [[ "$WP_TRAVISCI" == "test-e2e" ]] ; then
# Upgrade docker-compose, copied from Gutenberg.
sudo rm /usr/local/bin/docker-compose
curl -sL https://github.com/docker/compose/releases/download/1.24.0/docker-compose-Linux-x86_64 > docker-compose
chmod +x docker-compose
sudo mv docker-compose /usr/local/bin
fi
install:
- composer install
- nvm install --lts
- npm install
- npm run build
before_script:
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- |
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
phpenv config-rm xdebug.ini
else
echo "xdebug.ini does not exist"
fi
script:
- |
if [[ "$WP_TRAVISCI" == "test-php" ]] ; then
npm run test:php
elif [[ "$WP_TRAVISCI" == "test-js" ]] ; then
npm run test:js
elif [[ "$WP_TRAVISCI" == "lint" ]] ; then
npm run lint:php
npm run lint:js
npm run lint:pkg-json
npm run typescript
elif [[ "$WP_TRAVISCI" == "test-e2e" ]] ; then
npm run env start
npm run test:e2e
fi