Skip to content

Robo test, should that be exec not run? #1

@michaelpporter

Description

@michaelpporter

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();
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions