Skip to content

Commit

Permalink
Merge pull request #35 from eug-L/docker-dev-environment
Browse files Browse the repository at this point in the history
Docker dev environment
  • Loading branch information
eug-L authored Jul 5, 2024
2 parents 7020375 + 6d90727 commit bc791d4
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 7 deletions.
9 changes: 9 additions & 0 deletions tests/README.md → README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ And simply run

`source .env.local && composer run test`

## Debugging the test environment/Developing

Ensure you have this line in your `/etc/hosts`
```
127.0.0.1 <WEB_HOST>
```

Then go to `http://<WEB_HOST>/wp-admin` and login with `WORDPRESS_ADMIN_USER` & `WORDPRESS_ADMIN_PASSWORD`

## Running Tests on Github Actions

This repository is set up to use Github Actions to perform automated testing.
Expand Down
1 change: 0 additions & 1 deletion readme.md

This file was deleted.

1 change: 0 additions & 1 deletion tests/Coverages/PrivacyOptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public static function setupBeforeClass(): void {

self::$web->login();

self::$web->install_plugin();
self::$web->activate_plugin();
self::$web->set_widget( $config->tawk->property_id, $config->tawk->widget_id );
}
Expand Down
1 change: 0 additions & 1 deletion tests/Coverages/VisibilityOptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public static function setUpBeforeClass(): void {

self::$web->login();

self::$web->install_plugin();
self::$web->activate_plugin();
self::$web->set_widget( $config->tawk->property_id, $config->tawk->widget_id );
}
Expand Down
1 change: 0 additions & 1 deletion tests/Coverages/WidgetSelectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public static function setUpBeforeClass(): void {

self::$web->login();

self::$web->install_plugin();
self::$web->activate_plugin();
}

Expand Down
1 change: 0 additions & 1 deletion tests/Coverages/WoocommerceOptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public static function setupBeforeClass(): void {

self::$web->login();

self::$web->install_plugin();
self::$web->activate_plugin();
self::$web->set_widget( $config->tawk->property_id, $config->tawk->widget_id );
}
Expand Down
6 changes: 4 additions & 2 deletions tests/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,19 @@ services:
- db
container_name: wordpress
image: wordpress:latest
ports:
- 80:80
environment:
WORDPRESS_DB_HOST: ${WORDPRESS_DB_HOST}
WORDPRESS_DB_NAME: ${WORDPRESS_DB_NAME}
WORDPRESS_DB_USER: ${WORDPRESS_DB_USER}
WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD}
WORDPRESS_DEBUG: ${WORDPRESS_DEBUG}
WORDPRESS_CONFIG_EXTRA: |
define('WP_HOME', 'http://${WEB_HOST}');
define('WP_SITEURL', 'http://${WEB_HOST}');
define('FORCE_SSL_ADMIN', false);
volumes:
- wp_data:/var/www/html
- ../../tawkto:/var/www/html/wp-content/plugins/tawkto

wordpress-cli:
depends_on:
Expand Down Expand Up @@ -62,6 +63,7 @@ services:
shm_size: 2g
ports:
- ${SELENIUM_PORT}:4444
- 7900:7900
volumes:
db_data: {}
wp_data:

0 comments on commit bc791d4

Please sign in to comment.