-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.travis.yml
76 lines (62 loc) · 2.2 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
language: php
dist: xenial
services:
- mysql
- docker
- xvfb
cache:
directories:
- $HOME/.composer/cache/files
addons:
apt:
packages:
- tidy
- chromium-chromedriver
- chromium-browser
matrix:
fast_finish: true
include:
- php: 7.3
env:
global:
- DB=MYSQL
- SS_BASE_URL="http://localhost:8080/"
- SS_ENVIRONMENT_TYPE="dev"
- SS_BAMBUSA_SUPPRESS_MODAL=1
install:
# this would conflict with our chromium-browser installation
# and its version is incompatible with chromium-chromedriver
- sudo apt-get remove --purge google-chrome-stable
- export PATH=~/.composer/vendor/bin:$PATH
- pecl channel-update pecl.php.net
- phpenv rehash
- phpenv config-rm xdebug.ini || true
- echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
# Install composer dependencies
- composer require --no-update -- silverstripe/recipe-testing:^1
- composer require --no-update -- silverstripe/serve:^2;
- composer update --prefer-source
- composer show
- mkdir artifacts; cp composer.lock artifacts/
script:
- vendor/bin/phpunit --testsuite bambusa
- composer run-script lint
- phpdbg -qrr vendor/bin/phpunit --testsuite bambusa --coverage-clover=coverage.xml
- vendor/bin/serve --bootstrap-file vendor/silverstripe/cms/tests/behat/serve-bootstrap.php &> artifacts/serve.log &
- chromedriver --port=9515 --whitelisted-ips='127.0.0.1' > artifacts/chromedriver.log 2>&1 &
- vendor/bin/behat admin
deploy:
# deploy the new image to DockerHub
- provider: script
script: bash docker/deploy.sh "$DOCKERHUB_USER" "$DOCKERHUB_PASSWORD" "$DOCKERHUB_IMAGE"
on:
branch: master
- # report the outdated versions
provider: script
script: bash bin/composer-check-outdated.sh "$SLACK_WEBHOOK_URL"
on:
branch: master
after_failure:
- php ./vendor/silverstripe/framework/tests/behat/travis-upload-artifacts.php --if-env ARTIFACTS_BUCKET,ARTIFACTS_KEY,ARTIFACTS_SECRET --target-path $TRAVIS_REPO_SLUG/$TRAVIS_BUILD_ID/$TRAVIS_JOB_ID --artifacts-base-url https://s3.amazonaws.com/$ARTIFACTS_BUCKET/ --artifacts-path ./artifacts/
after_success:
- bash <(curl -s https://codecov.io/bash) -f coverage.xml