1- # PHP CircleCI 2.0 configuration file
2- #
3- # Check https://circleci.com/docs/2.0/language-php/ for more details
4- #
51version : 2
62jobs :
73 build :
84 docker :
9- # Specify the version you desire here
10- - image : circleci/php:7.4-node-browsers
11-
5+ - image : ' circleci/php:7.4-node-browsers'
126 steps :
137 - checkout
14-
158 - run :
16- name : " Prepare Environment"
9+ name : Prepare Environment
1710 command : |
1811 sudo apt update
1912 sudo docker-php-ext-install zip
20-
2113 - run :
22- name : " Create Environment file"
14+ name : Create Environment file
2315 command : |
2416 mv .env.testing .env
25-
26- # Download and cache dependencies
2717 - restore_cache :
2818 keys :
29- # "composer.lock" can be used if it is committed to the repo
30- - v1-dependencies-{{ checksum "composer.json" }}
31- # fallback to using the latest cache if no exact match is found
19+ - ' v1-dependencies-{{ checksum "composer.json" }}'
3220 - v1-dependencies-
33-
3421 - run :
35- name : " Install Dependencies"
22+ name : Install Dependencies
3623 command : composer install -n --prefer-dist
37-
3824 - save_cache :
39- key : v1-dependencies-{{ checksum "composer.json" }}
25+ key : ' v1-dependencies-{{ checksum "composer.json" }}'
4026 paths :
4127 - ./vendor
42-
4328 - run :
44- name : " Generate App key"
45- command : php artisan key:generate
46-
47- # run tests with phpunit
29+ name : Generate App key
30+ command : ' php artisan key:generate'
4831 - run :
49- name : " Run Unit Tests"
50- command : ./vendor/bin/phpunit tests/Unit
32+ name : Run Unit Tests
33+ command : ./vendor/bin/phpunit tests/Unit
34+ - run :
35+ name : Create database and run migration
36+ command : |
37+ touch database/database.sqlite
38+ php artisan migrate --env=testing
39+ - run :
40+ name : Run Http Tests
41+ command : ./vendor/bin/phpunit tests/Feature
42+ - run :
43+ name : Install Dusk and Update Chrome Drivers
44+ command : |
45+ composer require --dev laravel/dusk:"^4.0"
46+ composer require --dev staudenmeir/dusk-updater
47+ php artisan dusk:update --detect
48+ - run :
49+ name : Start Chrome Driver
50+ command : ./vendor/laravel/dusk/bin/chromedriver-linux
51+ background : true
52+ - run :
53+ name : Run Laravel Server
54+ command : php artisan serve
55+ background : true
56+ - run :
57+ name : Run Browser Tests Tests
58+ command : php artisan dusk
0 commit comments