-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
50 lines (43 loc) · 1.56 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
language: php
sudo: false
php:
- 7.2
services:
- mysql
mysql:
database: drupal
username: root
encoding: utf8
before_install:
- OS2WEB_PATH=$(pwd);
- echo "memory_limit=2G" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
install:
- composer global require hirak/prestissimo
- composer global require drush/drush:8.x-dev drupal/coder mglaman/drupal-check friendsoftwig/twigcs
- export PATH="$HOME/.config/composer/vendor/bin:$PATH"
- phpcs --config-set installed_paths ../../drupal/coder/coder_sniffer
- phpenv rehash
- nvm install node
- nvm use node
- npm install --global yarn
- cd ../ && composer create-project drupal-composer/drupal-project:8.x-dev drupal --no-interaction
- cd drupal
- DRUPAL_ROOT=$(pwd)/web
- export REPOSITORIES='"repositories":\ \['
- export REPOSITORIES_REPLACE='"repositories":\[\{"type":"path","url":"..\/os2web_logging","options":\{"symlink":false\}\},'
- export REQUIRE='"require":\ {'
- export REQUIRE_REPLACE='"require":{"os2web\/os2web_logging":"\*",'
- sed -i "s/$REPOSITORIES/$REPOSITORIES_REPLACE/g" composer.json
- sed -i "s/$REQUIRE/$REQUIRE_REPLACE/g" composer.json
- composer update os2web/os2web_logging
- PROJECT_PATH=$DRUPAL_ROOT/modules/contrib/os2web_logging
- cd $DRUPAL_ROOT/core
- yarn install
- npm install --global eslint-config-drupal-bundle stylelint
script:
- phpcs --standard=Drupal --ignore=*.md $PROJECT_PATH
- twigcs $PROJECT_PATH
- cd $DRUPAL_ROOT/core
- eslint $PROJECT_PATH
- stylelint --aei $PROJECT_PATH/**/*.css
- drupal-check $PROJECT_PATH