Created
December 10, 2019 12:46
-
-
Save roelofjan-elsinga/bbbd503e6b2e012a5153b45fed4f4821 to your computer and use it in GitHub Desktop.
Circle CI configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: 2 | |
| jobs: | |
| Test-PHP: | |
| machine: | |
| image: ubuntu-1604:201903-01 | |
| working_directory: ~/my-project | |
| steps: | |
| - checkout | |
| - restore_cache: | |
| keys: | |
| - my-project-composer-dep-{{ checksum "composer.lock" }} | |
| - run: | |
| name: Starting docker-compose services | |
| command: | | |
| echo "Starting docker-compose" | |
| docker-compose -f docker-compose-ci.yml up -d | |
| - run: | |
| name: Install Composer dependencies | |
| command: | | |
| mv .env.testing.example .env.testing | |
| docker run --rm \ | |
| -u $(id -u):$(id -g) \ | |
| -v `pwd`:`pwd` -w `pwd` \ | |
| --network=$(docker network ls | grep front | awk '{print $2}') \ | |
| roelofjanelsinga/test-suite \ | |
| composer install | |
| docker run --rm \ | |
| -u $(id -u):$(id -g) \ | |
| -v `pwd`:`pwd` -w `pwd` \ | |
| --network=$(docker network ls | grep front | awk '{print $2}') \ | |
| roelofjanelsinga/test-suite \ | |
| php artisan key:generate | |
| - save_cache: | |
| key: my-project-composer-dep-{{ checksum "composer.lock" }} | |
| paths: | |
| - ~/my-project/vendor | |
| - run: | |
| name: Run PHPUnit tests | |
| command: | | |
| docker run --rm \ | |
| -u $(id -u):$(id -g) \ | |
| -v `pwd`:`pwd` -w `pwd` \ | |
| --network=$(docker network ls | grep front | awk '{print $2}') \ | |
| roelofjanelsinga/test-suite \ | |
| ./vendor/bin/phpunit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment