forked from woocommerce/woocommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge config from from woocommerce/woocommerce-admin#3717
- Loading branch information
1 parent
c8d643b
commit c414edd
Showing
11 changed files
with
76 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** @format */ | ||
const baseConfig = require( '@woocommerce/e2e-env' ).esLintConfig; | ||
|
||
module.exports = { | ||
...baseConfig, | ||
root: true, | ||
env: { | ||
...baseConfig.env, | ||
browser: true, | ||
es6: true, | ||
node: true | ||
}, | ||
globals: { | ||
...baseConfig.globals, | ||
wp: true, | ||
wpApiSettings: true, | ||
wcSettings: true, | ||
es6: true | ||
}, | ||
rules: { | ||
camelcase: 0, | ||
indent: 0, | ||
'max-len': [ 2, { 'code': 140 } ], | ||
'no-console': 1 | ||
}, | ||
parser: 'babel-eslint', | ||
parserOptions: { | ||
ecmaVersion: 8, | ||
ecmaFeatures: { | ||
modules: true, | ||
experimentalObjectRestSpread: true, | ||
jsx: true | ||
} | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: '3.3' | ||
version: '3.7' | ||
|
||
services: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
module.exports = { | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: { | ||
node: 'current', | ||
}, | ||
}, | ||
], | ||
], | ||
const e2eBabelConfig = require( '@woocommerce/e2e-env' ).babelConfig; | ||
|
||
module.exports = function( api ) { | ||
api.cache( true ); | ||
|
||
return { | ||
...e2eBabelConfig, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,56 +2,13 @@ version: '3.7' | |
|
||
services: | ||
|
||
db: | ||
image: mariadb:10.5 | ||
restart: on-failure | ||
environment: | ||
MYSQL_DATABASE: testdb | ||
MYSQL_USER: wordpress | ||
MYSQL_PASSWORD: wordpress | ||
MYSQL_RANDOM_ROOT_PASSWORD: 'yes' | ||
wordpress-www: | ||
volumes: | ||
- db:/var/lib/mysql | ||
|
||
wordpress-woocommerce-dev: | ||
depends_on: | ||
- db | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
ports: | ||
- 8084:80 | ||
restart: on-failure | ||
environment: | ||
WORDPRESS_DB_HOST: db | ||
WORDPRESS_DB_NAME: testdb | ||
WORDPRESS_DB_USER: wordpress | ||
WORDPRESS_DB_PASSWORD: wordpress | ||
WORDPRESS_TABLE_PREFIX: "wp_" | ||
WORDPRESS_DEBUG: 1 | ||
volumes: | ||
- "./:/var/www/html/wp-content/plugins/woocommerce" | ||
- wordpress:/var/www/html | ||
# This path is relative to the first config file | ||
# which is in assets/components/e2e-env or node_modules/@woocommerce/e2e-env | ||
- "../../../:/var/www/html/wp-content/plugins/woocommerce" | ||
|
||
wordpress-cli: | ||
depends_on: | ||
- db | ||
- wordpress-woocommerce-dev | ||
image: wordpress:cli | ||
restart: on-failure | ||
user: xfs | ||
command: > | ||
/bin/sh -c ' | ||
wp core install --url=http://localhost:8084 --title="WooCommerce Core E2E Test Suite" --admin_user=admin --admin_password=password [email protected] --path=/var/www/html --skip-email; | ||
wp plugin activate woocommerce; | ||
wp theme install twentynineteen --activate; | ||
wp user create customer [email protected] --user_pass=password --role=customer --path=/var/www/html; | ||
wp post create --post_type=page --post_status=publish --post_title='Ready' --post_content='E2E-tests.'; | ||
' | ||
volumes: | ||
- "./:/var/www/html/wp-content/plugins/woocommerce" | ||
- wordpress:/var/www/html | ||
- "../../../:/var/www/html/wp-content/plugins/woocommerce" | ||
|
||
volumes: | ||
db: | ||
wordpress: |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
echo "Initializing WooCommerce E2E" | ||
|
||
wp plugin install woocommerce --activate | ||
wp theme install twentynineteen --activate | ||
wp user create customer [email protected] --user_pass=password --role=customer --path=/var/www/html | ||
wp post create --post_type=page --post_status=publish --post_title='Ready' --post_content='E2E-tests.' |