-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
72 lines (64 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
language: php
dist: xenial
sudo: false
addons:
chrome: stable
cache:
directories:
- $HOME/.composer/cache/files
matrix:
fast_finish: true
include:
- php: 7.2
- php: 7.3
- php: 7.4
before_install:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
- composer self-update -q
install:
- COMPOSER_MEMORY_LIMIT=-1 composer update $COMPOSER_FLAGS
- ./bin/console bolt:info
- nvm install 12.5
- npm ci
- mkdir -p ./var/log/e2e-reports/report/features/
- touch ./var/log/e2e-reports/report/features/.gitkeep
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 --group=without-images -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"
- export PATH=$PATH:$PWD/vendor/bin
script:
# this checks that the source code follows the Bolt Code Syntax rules
- ./vendor/bin/ecs check
- ./vendor/bin/phpstan analyse -c phpstan.neon src
# run EsLint on Javascript files
- npm run lint
# run StyleLint on SCSS
- npm run stylelint
# 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 # temporarily disabled bue to bug in api platform 2.4.0-beta.2
# this checks that Doctrine's mapping configurations are valid
- ./bin/console doctrine:schema:validate --skip-sync -vvv --no-interaction
# run PHP Unit
- ./vendor/bin/phpunit
# run API tests
- make behat-api-quiet
# run JS e2e tests
- make behat-js-quiet
# Upload Behat logs
- ./vendor/bin/upload-textfiles "var/log/behat-reports/*.log"