-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
73 lines (65 loc) · 1.93 KB
/
.travis.yml
File metadata and controls
73 lines (65 loc) · 1.93 KB
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
language: php
dist: xenial
sudo: false
php:
# This PHP version (which is set by Travis via phpenv) is overridden in the
# before_install section.
- '8.0'
cache:
directories:
- ~/.npm
- ~/.cache
- ~/.composer/cache
addons:
apt:
sources:
# Third party apt-repositories are removed from Xenial Build Environment:
# https://docs.travis-ci.com/user/reference/xenial/
# We need to add PHP repository ourselves.
- sourceline: 'ppa:ondrej/php'
packages:
- libgconf-2-4
# Install PHP and extensions.
- ph8.0
- php8.0-common
- php8.0-xml
- php8.0-xmlrpc
- php8.0-curl
- php8.0-imap
- php8.0-mbstring
- php8.0-opcache
- php8.0-soap
- php8.0-json
- php8.0-zip
- php8.0-intl
- php8.0-sqlite
- php8.0-gd
- php8.0-imagick
before_install:
# Override the phpenv's PHP to the one we installed via APT. We do this to
# workaround the "too many SQL variables" error which happens when SQLite's
# SQLITE_MAX_VARIABLE_NUMBER parameter is set to the default value (999).
- sudo cp /usr/bin/php8.0 `which php`
- php --version
- echo 'sendmail_path = /bin/true' | sudo tee -a `php -r 'echo php_ini_loaded_file();'`
- composer self-update
# Use node version set in .nvmrc file.
- nvm install && nvm use
install:
- composer install
- npm ci
- source .envrc
script:
- drush si -y minimal --sites-subdir default --existing-config --account-name admin --account-pass admin
- drush serve :8889 > log.txt 2>&1 &
# Wait for drush serve to start up, but only for 20 seconds.
- |
DRUSH_SERVE_WAIT=0; \
until curl -sS http://127.0.0.1:8889 >/dev/null || (($DRUSH_SERVE_WAIT > 19)); \
do sleep 1 && \
DRUSH_SERVE_WAIT=$(($DRUSH_SERVE_WAIT + 1)) && \
echo "Waited $DRUSH_SERVE_WAIT seconds for drush serve."; \
done
- composer run-script run-tests --timeout 0
notifications:
email: false