Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

Commit 90bdc1e

Browse files
authored
Merge pull request #54 from OS2Forms/add_automated_ci_checks_to_project
Adding automated CI checks to project.
2 parents ce92abc + ac0b61c commit 90bdc1e

File tree

4 files changed

+397
-352
lines changed

4 files changed

+397
-352
lines changed

.travis.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
language: php
2+
3+
sudo: false
4+
5+
php:
6+
- 7.4
7+
8+
before_install:
9+
- echo "memory_limit=2G" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
10+
11+
install:
12+
- composer global require drush/drush:8.x-dev drupal/coder mglaman/drupal-check friendsoftwig/twigcs
13+
- export PATH="$HOME/.config/composer/vendor/bin:$PATH"
14+
- phpcs --config-set installed_paths ../../drupal/coder/coder_sniffer
15+
- phpenv rehash
16+
- nvm install 12.13.0
17+
- nvm use 12
18+
- npm install --global yarn
19+
- cd ../ && composer create-project drupal-composer/drupal-project:8.x-dev drupal --no-interaction
20+
- cd drupal
21+
- DRUPAL_ROOT=$(pwd)/web
22+
- export REPOSITORIES='"repositories":\ \['
23+
- export REPOSITORIES_REPLACE='"repositories":\[\{"type":"path","url":"..\/os2forms_forloeb","options":\{"symlink":false\}\},'
24+
- export REQUIRE='"require":\ {'
25+
- export REQUIRE_REPLACE='"require":{"os2forms\/os2forms_forloeb":"\*",'
26+
- sed -i "s/$REPOSITORIES/$REPOSITORIES_REPLACE/g" composer.json
27+
- sed -i "s/$REQUIRE/$REQUIRE_REPLACE/g" composer.json
28+
- composer update os2forms/os2forms_forloeb
29+
- PROJECT_PATH=$DRUPAL_ROOT/modules/contrib/os2forms_forloeb
30+
- cd $DRUPAL_ROOT/core
31+
- yarn install
32+
- npm install --global eslint-config-drupal-bundle stylelint
33+
34+
script:
35+
- phpcs --standard=Drupal --ignore=*.md $PROJECT_PATH
36+
- twigcs $PROJECT_PATH
37+
- cd $DRUPAL_ROOT/core
38+
- eslint $DRUPAL_ROOT/modules/contrib/os2forms_forloeb
39+
- stylelint --aei $DRUPAL_ROOT/modules/contrib/os2forms_forloeb/**/*.css
40+
- drupal-check $DRUPAL_ROOT/modules/contrib/os2forms_forloeb

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"drupal/webform_scheduled_tasks": "^2.0",
5353
"drupal/webform_views": "5.0.0-alpha7",
5454
"drupal/workflow_participants": "^2.4",
55-
"vlucas/phpdotenv": "^2.4",
55+
"vlucas/phpdotenv": "^4.0",
5656
"webmozart/path-util": "2.3.0",
5757
"zaporylie/composer-drupal-optimizations": "1.2.0"
5858
},

os2forms_forloeb.module

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function os2forms_forloeb_workflow_maestro_reassign_form_submit(&$form, &$form_s
9494
MaestroEngine::setProcessVariable("assigned_to", $reviewer_username, $processID);
9595

9696
//Provide some feedback
97-
drupal_set_message("Content Reassigned");
97+
\Drupal::messenger()->addStatus("Content Reassigned");
9898

9999
}
100100

0 commit comments

Comments
 (0)