diff --git a/.travis.yaml b/.travis.yaml new file mode 100644 index 0000000..82109ac --- /dev/null +++ b/.travis.yaml @@ -0,0 +1,32 @@ +# Tell Travis CI we are using PHP +language: php +# The platforms you wants to test on +dist: bionic +os: + - linux +# Define the php versions against we want to test our code +php: + - '7.3' + +# Install packages those will be required during build +install: + - composer install --no-interaction + +# Run main commands +script: + - vendor/bin/codecept run unit,api +# - make run-tests-unit +# - make run-tests-api +# - make run-tests-acceptance + +# Tell Travis CI to monitor only 'master' branch +branches: + only: + - master + - feature/travis-continuous-integration + +# Cache folder, you can delete cache from Travis CI web interface +cache: + directories: + - vendor + - $HOME/.composer/cache diff --git a/README.md b/README.md index bb5ad47..5410a66 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,12 @@ Two docker containers: - api-php : PHP 7.3 / Symfony 5.X - api-nginx : NGINX 1.17 + ## Test -[codeception](https://codeception.com/) to run all the tests +Adding the `docker-compose.test.yaml` you can run the tests +via a [codeception](https://codeception.com/) container named `api-test` ```bash make run-tests-all