diff --git a/.travis.yml b/.travis.yml index fa07b99..7a2e6a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,9 +28,15 @@ before_script: jobs: include: - - stage: Test + - stage: PHP Info + script: + - php --version + - stage: Unit Test script: - mkdir -p tests/output - XDEBUG_MODE=coverage phpunit --configuration phpunit.xml after_success: - - bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN -f tests/output/clover.xml \ No newline at end of file + - bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN -f tests/output/clover.xml + - stage: Benchmark Test + script: + - bin/phpbench run --report=env --progress=dots diff --git a/README.md b/README.md index 7fa9964..9a53c11 100644 --- a/README.md +++ b/README.md @@ -77,12 +77,14 @@ create an issue, and/or if possible create a pull request. For local package development use [Docker](https://www.docker.com/products/docker-desktop): -**Clone Repo** +#### Local Setup +Clone Repo ``` git clone https://github.com/Ouxsoft/LuckByDice.git cd LuckByDice ``` + **Standard container** ``` docker build --target standard --tag luckbydice:latest -f Dockerfile . @@ -96,20 +98,27 @@ docker run -it luckbydice:latest php tests/src/Feature/Cli.php 6d6 docker build --target test --tag luckbydice:latest -f Dockerfile . docker run -it --mount type=bind,source="$(pwd)"/,target=/application/ luckbydice:latest composer install -# Feature CLI Test using local volume -docker run -it --mount type=bind,source="$(pwd)"/,target=/application/ luckbydice:latest php tests/src/Feature/Cli.php 1d10+4*2 0 - -# Interactive Tests server avaliable at http://localhost/ -docker run -it -p 80:80 --mount type=bind,source="$(pwd)"/,target=/application luckbydice:latest bash -c 'cd tests/src/Interactive && php -S 0.0.0.0:80' - -# Unit Tests using local volume +# Automated Tests +## Unit Tests using local volume docker run -it --mount type=bind,source="$(pwd)"/,target=/application/ luckbydice:latest composer test -# Benchmark Tests using local volume +## Benchmark Tests using local volume docker run -it --mount type=bind,source="$(pwd)"/,target=/application/ luckbydice:latest ./vendor/bin/phpbench run tests/src/Benchmark --report=default ``` -**Docs container** +## Manual Tests +### Feature CLI Test using local volume +``` +docker run -it --mount type=bind,source="$(pwd)"/,target=/application/ luckbydice:latest php tests/src/Feature/Cli.php 1d10+4*2 0 +``` + +### Interactive Tests +Creates a server available at [http://localhost/](http://localhost/) +``` +docker run -it -p 80:80 --mount type=bind,source="$(pwd)"/,target=/application luckbydice:latest bash -c 'cd tests/src/Interactive && php -S 0.0.0.0:80' +``` + +### Build Docs ``` # Build Docs docker build --target docs --tag luckbydice:docs-latest -f Dockerfile .