Skip to content

Commit 3af7709

Browse files
wanzeWengerK
authored andcommitted
init travis integration
use existing module to prevent travis-ci to fail - DRUPAL_TI_MODULE_NAME must be changed on release use the propre module name to make travis works properly update tests group name with commerce_google_tag_manager fix composer.json for travis-ci add dependencies drupal:commerce & drupal:google_tag attempts another approch to add depn attempts to use patch-1 use wengerk repo of drupal_ti with fix for composer multiple dependencies use wengerk repo of drupal_ti with fix for composer multiple dependencies add dependency on commerce_checkout
1 parent e965f35 commit 3af7709

7 files changed

+172
-24
lines changed

.coveralls.yml

Whitespace-only changes.

.gitignore

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
node_modules
2+
.sass-cache
3+
*.DS_Store
4+
.publish
5+
.bundle
6+
.env
7+
8+
/dist
9+
/build
10+
/log
11+
12+
# Ignore directories generated by Composer
13+
vendor
14+
composer.lock
15+
16+
# Ignore files generated by PhpStorm
17+
.idea

.styleci.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
preset: psr2
2+
3+
risky: false
4+
5+
finder:
6+
exclude:
7+
- "tests"
8+
- "vendor"
9+
name:
10+
- "*.php"
11+
- "*.twig"
12+
path:
13+
- "./"
14+
not-path:
15+
- "libraries"

.travis.yml

+127
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# @file
2+
# .travis.yml - Drupal for Travis CI Integration
3+
#
4+
# Template provided by https://github.com/LionsAd/drupal_ti.
5+
6+
language: php
7+
8+
sudo: false
9+
10+
php:
11+
- 7.1
12+
- 7.2
13+
14+
matrix:
15+
fast_finish: true
16+
allow_failures:
17+
- php: hhvm
18+
19+
env:
20+
global:
21+
# add composer's global bin directory to the path
22+
# see: https://github.com/drush-ops/drush#install---composer
23+
- PATH="$PATH:$HOME/.composer/vendor/bin"
24+
25+
# Configuration variables.
26+
- DRUPAL_TI_MODULE_NAME="commerce_google_tag_manager"
27+
- DRUPAL_TI_SIMPLETEST_GROUP="commerce_google_tag_manager"
28+
29+
# Define runners and environment vars to include before and after the
30+
# main runners / environment vars.
31+
#- DRUPAL_TI_SCRIPT_DIR_BEFORE="./drupal_ti/before"
32+
#- DRUPAL_TI_SCRIPT_DIR_AFTER="./drupal_ti/after"
33+
34+
# The environment to use, supported are: drupal-7, drupal-8
35+
- DRUPAL_TI_ENVIRONMENT="drupal-8"
36+
37+
# Switch to 8.6.x versions instead of 8.1.x by default.
38+
- DRUPAL_TI_CORE_BRANCH="8.6.x"
39+
40+
# The installation profile to use:
41+
#- DRUPAL_TI_INSTALL_PROFILE="testing"
42+
- COMPOSER_EXTRA_DEPENDENCIES="drupal/commerce:^2.8 drupal/google_tag:^1.1"
43+
44+
# Drupal specific variables.
45+
- DRUPAL_TI_DB="drupal_travis_db"
46+
- DRUPAL_TI_DB_URL="mysql://root:@127.0.0.1/drupal_travis_db"
47+
# Note: Do not add a trailing slash here.
48+
- DRUPAL_TI_WEBSERVER_URL="http://127.0.0.1"
49+
- DRUPAL_TI_WEBSERVER_PORT="8080"
50+
51+
# Simpletest specific commandline arguments, the DRUPAL_TI_SIMPLETEST_GROUP is appended at the end.
52+
- DRUPAL_TI_SIMPLETEST_ARGS="--verbose --color --concurrency 4 --url $DRUPAL_TI_WEBSERVER_URL:$DRUPAL_TI_WEBSERVER_PORT"
53+
54+
# === Behat specific variables.
55+
# This is relative to $TRAVIS_BUILD_DIR
56+
- DRUPAL_TI_BEHAT_DIR="./tests/behat"
57+
# These arguments are passed to the bin/behat command.
58+
- DRUPAL_TI_BEHAT_ARGS=""
59+
# Specify the filename of the behat.yml with the $DRUPAL_TI_DRUPAL_DIR variables.
60+
- DRUPAL_TI_BEHAT_YML="behat.yml.dist"
61+
# This is used to setup Xvfb.
62+
- DRUPAL_TI_BEHAT_SCREENSIZE_COLOR="1280x1024x16"
63+
# The version of selenium that should be used.
64+
- DRUPAL_TI_BEHAT_SELENIUM_VERSION="2.48.2"
65+
# Set DRUPAL_TI_BEHAT_DRIVER to "selenium" to use "firefox" or "chrome" here.
66+
- DRUPAL_TI_BEHAT_DRIVER="phantomjs"
67+
- DRUPAL_TI_BEHAT_BROWSER="firefox"
68+
69+
# PHPUnit specific commandline arguments.
70+
- DRUPAL_TI_PHPUNIT_ARGS=""
71+
# Specifying the phpunit-core src/ directory is useful when e.g. a vendor/
72+
# directory is present in the module directory, which phpunit would then
73+
# try to find tests in. This option is relative to $TRAVIS_BUILD_DIR.
74+
#- DRUPAL_TI_PHPUNIT_CORE_SRC_DIRECTORY="./tests/src"
75+
76+
# Code coverage via coveralls.io
77+
- DRUPAL_TI_COVERAGE="satooshi/php-coveralls:0.6.*"
78+
# This needs to match your .coveralls.yml file.
79+
- DRUPAL_TI_COVERAGE_FILE="build/logs/clover.xml"
80+
81+
# Debug options
82+
# - DRUPAL_TI_DEBUG="-x -v"
83+
# Set to "all" to output all files, set to e.g. "xvfb selenium" or "selenium",
84+
# etc. to only output those channels.
85+
#- DRUPAL_TI_DEBUG_FILE_OUTPUT="selenium xvfb webserver"
86+
# - DRUPAL_TI_DEBUG_FILE_OUTPUT="all"
87+
88+
matrix:
89+
# [[[ SELECT ANY OR MORE OPTIONS ]]]
90+
#- DRUPAL_TI_RUNNERS="phpunit"
91+
#- DRUPAL_TI_RUNNERS="simpletest"
92+
#- DRUPAL_TI_RUNNERS="behat"
93+
#- DRUPAL_TI_RUNNERS="phpunit simpletest behat"
94+
# Use phpunit-core to test modules with phpunit with Drupal 8 core.
95+
- DRUPAL_TI_RUNNERS="phpunit-core"
96+
97+
mysql:
98+
database: drupal_travis_db
99+
username: root
100+
encoding: utf8
101+
102+
before_install:
103+
- composer self-update
104+
- cd ./tests
105+
- composer global config repositories.repo-name git https://github.com/wengerk/drupal_ti
106+
- composer global require "lionsad/drupal_ti:dev-patch-1"
107+
- drupal-ti before_install
108+
109+
install:
110+
- drupal-ti install
111+
112+
before_script:
113+
- drupal-ti before_script
114+
# Update from PHPUnit 4.x to 6.x as required by Drupal 8.6.x.
115+
- composer run-script drupal-phpunit-upgrade --working-dir=/home/travis/build/gridonic/drupal-8/drupal --no-interaction
116+
117+
script:
118+
# Disable deprecations helper to avoid build failed caused by usage of
119+
# deprecations in Drupal Core.
120+
- export SYMFONY_DEPRECATIONS_HELPER=disabled
121+
- drupal-ti script
122+
123+
after_script:
124+
- drupal-ti after_script
125+
126+
notifications:
127+
email: false

README.md

-18
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,6 @@ loads all stored events via ajax and pushes them to Google Tag Manager via data
1717

1818
The module offers a service to track other Enhanced Ecommerce events such as _Product Impressions_.
1919

20-
## Installation
21-
22-
Since this module is not yet released on Drupal, we need to tell Composer
23-
where to find it. Add the following entry in the `repositories` section
24-
of your `composer.json` located in the Drupal root directory:
25-
26-
```
27-
{
28-
"type": "vcs",
29-
"url": "https://github.com/gridonic/commerce_gtm_enhanced_ecommerce"
30-
}
31-
```
32-
33-
Then execute `composer require gridonic/commerce_gtm_enhanced_ecommerce`.
34-
35-
This should install the module to `web/modules/contrib/commerce_gtm_enhanced_ecommerce`.
36-
Enable the module in Drupal, e.g. via `drush en commerce_gtm_enhanced_ecommerce`.
37-
3820
## Configuration
3921

4022
The module does (currently) not offer any configuration options. The configuration is

commerce_google_tag_manager.info.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: 'Enhanced Ecommerce for Google Tag Manager'
22
description: 'Provides Commerce integration for Enhanced Ecommerce events via Google Tag Manager'
33
package: 'Commerce (contrib)'
44
core: 8.x
5-
dependencies:
6-
- commerce
7-
- google_tag
85
type: module
6+
dependencies:
7+
- drupal:google_tag
8+
- drupal:commerce
9+
- drupal:commerce_checkout

composer.json

+9-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@
33
"type": "drupal-module",
44
"description": "Provides Commerce integration for Enhanced Ecommerce events via Google Tag Manager",
55
"homepage": "https://www.drupal.org/project/commerce_google_tag_manager",
6-
"license": "GPL-2.0+",
6+
"license": "GPL-2.0-or-later",
77
"keywords": ["drupal", "commerce", "google tag manager", "enhanced ecommerce"],
8+
"support": {
9+
"issues": "https://www.drupal.org/project/issues/commerce_google_tag_manager"
10+
},
811
"require": {
9-
"drupal/core": "^8.5",
10-
"drupal/commerce": "~2",
12+
"drupal/commerce": "^2.8",
1113
"drupal/google_tag": "^1.1"
14+
},
15+
"require-dev": {
16+
"squizlabs/php_codesniffer": "^2.7",
17+
"drupal/coder": "*"
1218
}
1319
}

0 commit comments

Comments
 (0)