File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 7
7
build :
8
8
docker :
9
9
# specify the version you desire here
10
- - image : circleci/php:7.1.5 -browsers
11
-
10
+ - image : circleci/php:7.1-browsers
11
+
12
12
# Specify service dependencies here if necessary
13
13
# CircleCI maintains a library of pre-built images
14
14
# documented at https://circleci.com/docs/2.0/circleci-images/
15
- # - image: circleci/mysql:9.4
15
+ - image : circleci/postgres:10-alpine-ram
16
16
17
17
working_directory : ~/repo
18
18
32
32
paths :
33
33
- ./vendor
34
34
key : v1-dependencies-{{ checksum "composer.json" }}
35
-
35
+
36
36
# run tests!
37
- - run : phpunit
37
+ - run :
38
+ name : Run tests
39
+ command : vendor/bin/phpunit
40
+ environment :
41
+ DB_DRIVER : postgres
Original file line number Diff line number Diff line change @@ -221,6 +221,10 @@ private function createSQLServerDB()
221
221
222
222
private function startPHP (string $ version , string $ dbType )
223
223
{
224
+ if (!in_array ($ version , ['7.1 ' , '7.2 ' ])) {
225
+ throw new \InvalidArgumentException ('PHP Version must be 7.1 or 7.2 ' );
226
+ }
227
+
224
228
$ dbUser = 'root ' ;
225
229
if ($ dbType === 'postgres ' ) {
226
230
$ dbUser = 'postgres ' ;
@@ -289,7 +293,7 @@ private function gitVerifyBranchIsUpToDate()
289
293
->silent (true )
290
294
->exec ('fetch --dry-run ' )
291
295
->run ();
292
- if ($ modifiedFiles ->getMessage () !== ' Is Up ToDate ' ) {
296
+ if (! empty ( $ modifiedFiles ->getMessage ()) ) {
293
297
throw new \RuntimeException ('Your local repo is not up to date, run "git pull" ' );
294
298
}
295
299
}
Original file line number Diff line number Diff line change 7
7
stopOnFailure =" true"
8
8
syntaxCheck =" true" >
9
9
<php >
10
- <env name =' DB_DRIVER' value =' pdo_mysql ' />
10
+ <env name =' DB_DRIVER' value =' mysql ' />
11
11
<env name =' DB_USER' value =' root' />
12
12
<env name =' DB_PASSWORD' value =' ' />
13
13
<env name =' DB_HOST' value =' 127.0.0.1' />
You can’t perform that action at this time.
0 commit comments