-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
69 lines (62 loc) · 2.1 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
language: php
dist: trusty
sudo: false
addons:
chrome: stable
cache:
directories:
- $HOME/.composer/cache/files
matrix:
fast_finish: true
include:
- php: 7.1
- php: 7.2
- php: 7.3
- php: nightly
env: COMPOSER_FLAGS="--ignore-platform-reqs"
allow_failures:
- php: nightly
before_install:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
- composer self-update
install:
- COMPOSER_MEMORY_LIMIT=-1 composer install $COMPOSER_FLAGS
- nvm install 8.2
- npm install
- cd tests/e2e && npm install && node ./node_modules/protractor/bin/webdriver-manager update --gecko=false && cd ../..
before_script:
# build assets
- npm run build
# prepare web server for e2e tests
- ./bin/console doctrine:database:create
- ./bin/console doctrine:schema:create
- ./bin/console doctrine:fixtures:load -n
- ./bin/console server:start 127.0.0.1:8088
# test if web server works
- sleep 3
- wget "http://127.0.0.1:8088/bolt/login"
script:
# run PHP Unit / PHP Spec tests
- ./vendor/bin/phpunit
- ./vendor/bin/phpspec run
# this checks that the source code follows the Bolt Code Syntax rules
- ./vendor/bin/ecs check src
- ./vendor/bin/phpstan analyse -c phpstan.neon src
# this checks that the YAML config files contain no syntax errors
- ./bin/console lint:yaml config
# this checks that the Twig template files contain no syntax errors
- ./bin/console lint:twig templates
# this checks that the XLIFF translations contain no syntax errors
- ./bin/console lint:xliff translations
# this checks that the application doesn't use dependencies with known security vulnerabilities
- ./bin/console security:check
# this checks that the composer.json and composer.lock files are valid
- composer validate --strict
# this checks that Doctrine's mapping configurations are valid
- ./bin/console doctrine:schema:validate --skip-sync -vvv --no-interaction
# run jest unit tests
- npm test
# run API tests
- ./vendor/bin/behat
# run e2e tests with Kakunin
- cd tests/e2e && npm run kakunin && cd ../..