Last active
August 6, 2021 09:52
-
-
Save rrcfesc/c16212e4510d1528655f9cec5299f81f to your computer and use it in GitHub Desktop.
BitBucket Pipeline with Selenium Remote WebDriver
This file contains hidden or 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 is a sample build configuration for PHP. | |
# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples. | |
# Only use spaces to indent your .yml configuration. | |
# ----- | |
# You can specify a custom docker image from Docker Hub as your build environment. | |
image: rrcfesc/dockerfilesmagento2:7.2 | |
pipelines: | |
branches: | |
master: | |
- step: | |
name: "Build" | |
caches: | |
- composer | |
- symfony-vendor | |
- symfony-cache | |
- symfony-logs | |
script: | |
- cp symfony/app/config/parameters_database_local.yml.dist symfony/app/config/parameters_database_local.yml | |
- cp symfony/tests/config.local.php.dist symfony/tests/config.local.php | |
- cd symfony | |
- composer install | |
artifacts: | |
- build/** | |
- symfony/vendor/** | |
- symfony/app/config/parameters_database_local.yml | |
- symfony/app/cache/** | |
- symfony/tests/config.local.php | |
- parallel: | |
- step: | |
name: "Coding Standards" | |
caches: | |
- composer | |
- symfony-vendor | |
- symfony-cache | |
- symfony-logs | |
script: | |
- cd symfony | |
- ./vendor/bin/phpcs --cache=app/cache/.phpcs-cache | |
- ./vendor/bin/psalm | |
- step: | |
name: "Unit Tests" | |
caches: | |
- composer | |
- symfony-vendor | |
- symfony-cache | |
- symfony-logs | |
services: | |
- mysql | |
script: | |
- cd symfony | |
- ./vendor/bin/phpunit --testsuite=unit --cache-result-file=app/cache/.phpunit.result.cache | |
- step: | |
name: "Functional Tests" | |
caches: | |
- composer | |
- symfony-vendor | |
- symfony-cache | |
- symfony-logs | |
services: | |
- mysql | |
- hub | |
- chrome | |
script: | |
- cd symfony | |
- ./vendor/bin/phpunit --testsuite=functional --cache-result-file=app/cache/.phpunit.result.cache | |
- step: | |
name: "Selenium Tests" | |
caches: | |
- composer | |
- symfony-vendor | |
- symfony-cache | |
- symfony-logs | |
services: | |
- mysql | |
- hub | |
- chrome | |
script: | |
- cd symfony | |
- ./vendor/bin/phpunit --testsuite=selenium --cache-result-file=app/cache/.phpunit.result.cache | |
definitions: | |
caches: | |
symfony-vendor: symfony/vendor | |
symfony-cache: symfony/app/cache | |
symfony-logs: symfony/app/logs | |
services: | |
hub: | |
image: selenium/hub | |
environment: | |
BROWSER: chrome | |
chrome: | |
image: selenium/node-chrome:3.141.5 | |
environment: | |
HUB_PORT_4444_TCP_ADDR: 127.0.0.1 | |
HUB_PORT_4444_TCP_PORT: "4444" | |
mysql: | |
image: mysql:5.7 | |
environment: | |
MYSQL_DATABASE: 'dabase_name' | |
MYSQL_ROOT_PASSWORD: 'password' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment