Coder Social home page Coder Social logo

zgraveyard / php-7.2-dusk-bitbucket-pipelines Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 7 KB

This is a simple PHP 7.2 image which contain just the minimum required to run laravel Dusk on bitbucket pipelines.

Home Page: https://hub.docker.com/r/zaherg/php-7.2-dusk-bitbucket-pipelines/

License: MIT License

Shell 42.79% Dockerfile 57.21%
php docker testing laravel dusk laravel-dusk composer

php-7.2-dusk-bitbucket-pipelines's Introduction

PHP image to run dusk on Pipelines

Docker Pulls

This is a simple PHP 7.2 image which contain just the minimum required to run Laravel Dusk on bitbucket pipelines.

You can read more about it from this post https://zah.me/2018/02/03/running-laravel-dusk-tests-on-bitbucket-the-easy-way/

bitbucket-pipeline example

This is just an example, the content of the file .env.dusk is not different that .env.example except that the APP_URL value is http://localhost:8000 since am using artisan serve command.

APP_URL=http://localhost:8000

Your bitbucket-pipeline.yml should look like this:

# 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: zaherg/php-7.2-dusk-bitbucket-pipelines:latest


pipelines:
  default:
    - step:
        caches:
          - composer
        script:
          - cp .env.dusk .env
          - composer install --no-progress --no-suggest --prefer-dist
          - php artisan serve &
          - php artisan dusk

Duck configuration:

To make it work, you will need to make sure that you add the argument --no-sandbox to your options so the function should look like

    /**
     * Create the RemoteWebDriver instance.
     *
     * @return \Facebook\WebDriver\Remote\RemoteWebDriver
     */
    protected function driver()
    {
        $options = (new ChromeOptions)->addArguments([
            '--disable-gpu',
            '--headless',
            '--no-sandbox'
        ]);

        return RemoteWebDriver::create(
            'http://localhost:9515', DesiredCapabilities::chrome()->setCapability(
                ChromeOptions::CAPABILITY, $options
            )
        );
    }

php-7.2-dusk-bitbucket-pipelines's People

Contributors

zaherg avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.