Sign inSign up

brumbrum/php-codeception

By brumbrum

โ€ขUpdated almost 3 years ago

Image
0

5.3K

brumbrum/php-codeception repository overview

โ IMMAGINE CODECEPTION

Questa immagine avvia i test di codeception in background. Per farlo รจ necessario che sia installato codeception e robo attraverso composer.

โ Istruzioni
  • composer require consolidation/robo --dev
  • composer require henrikbjorn/lurker --dev
  • composer require codeception/codeception --dev
  • crea il file RoboFile.php nella root del progetto (vedi contenuto dopo)
  • configura codeception (vedi dopo per una configurazione base)
  • aggiungi il container al docker-compose.yml (vedi dopo)
โ Robofile.php
<?php

/**
 * This is project's console commands configuration for Robo task runner.
 *
 * @see http://robo.li/
 */
class RoboFile extends \Robo\Tasks
{
    /**
     * Watcha i file
     */
    public function watch()
    {
        $this->taskWatch()
            ->monitor('composer.json', function () {
                $this->codecept();
            })->monitor('src', function () {
                $this->codecept();
            })->monitor('tests/unit', function () {
                $this->codecept();
            })->run();
    }

    /**
     * Avvia i test di codeception
     */
    public function codecept()
    {
        $this->taskCodecept()
            ->suite('unit')
            ->env('dev')
            //->group('admin')
            ->coverage()
            #->xml()
            #->html()
            ->run();
    }
}
โ Codeception.yml
paths:
    tests: tests
    output: test-reports/
    data: tests/_data
    support: tests/_support
    envs: tests/_envs
actor_suffix: Tester
extensions:
    enabled:
      - Codeception\Extension\RunFailed
coverage:
    enabled: true
    include:
      - src/*

La cartella di output DEVE essere impostata su test-reports/ altrimenti bitbucket non vede i report.

โ docker-compose.yml
codeception:
  image: "brumbrum/php-codeception"
  volumes:
    - .:/data:z
  environment:
    - quelle che servono
  env_file:
    - se serve

Tag summary

Content type

Image

Digest

Size

315.3 MB

Last updated

over 5 years ago

docker pull brumbrum/php-codeception