dustinleblanc/super-scripts

Robo test, should that be exec not run?

Opened this issue · 0 comments

Thank you for this example setup, it has helped me learn docker and robo much faster.

In your RoboFile.php you have test setup to run the container. You also have test in your docker-compose. In my setup this command creates a new container each time I run robo test I changed it to exec which will use the existing container.

/**
     * Run Behat tests.
     */
    public function test()
    {
        $this->taskExec(self::COMPOSE_BIN)
            ->args(['run', 'testphp', self::BEHAT_BIN])
            ->option('colors')
            ->option('format', 'progress')
            ->run();
    }

My change.

/**
     * Run Behat tests.
     */
    public function test()
    {
        $this->taskExec(self::COMPOSE_BIN)
            ->args(['exec', 'testphp', self::BEHAT_BIN])
            ->option('colors')
            ->option('format', 'progress')
            ->run();
    }