Skip to content

Commit

Permalink
Upgrade to PHP 7.4 (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b authored Jan 3, 2020
1 parent fb4782c commit 3432e0a
Show file tree
Hide file tree
Showing 17 changed files with 109 additions and 86 deletions.
60 changes: 42 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,55 @@ version: 2
jobs:
build:
docker:
- image: circleci/php:7.2-cli
- image: circleci/php:7.4-cli

working_directory: ~/repo

steps:
- checkout
- checkout

- restore_cache:
keys:
- v1-dependencies-{{ checksum "composer.json" }}
- v1-dependencies-
- restore_cache:
keys:
- composer-{{ checksum "composer.json" }}

- run: composer install -n --prefer-dist
- run: composer install -n --prefer-dist

- save_cache:
paths:
- ./vendor
key: v1-dependencies-{{ checksum "composer.json" }}
- save_cache:
paths:
- ./vendor
key: composer-{{ checksum "composer.json" }}

- run: mkdir test/unit/_junit
- run: vendor/bin/phpunit -c test/unit/phpunit.xml --log-junit test/unit/_junit/junit.xml -d memory_limit=512M
- persist_to_workspace:
root: /home/circleci/repo
paths:
- ./

- store_test_results:
path: test/unit/_junit
test:
docker:
- image: circleci/php:7.4-cli

working_directory: ~/repo

- store_artifacts:
path: test/unit/_coverage
destination: TestCoverage
steps:
- attach_workspace:
at: /home/circleci/repo
- run:
name: Unit Tests
command: vendor/bin/phpunit -c test/phpunit/phpunit.xml --log-junit test/unit/_junit/junit.xml -d memory_limit=512M

- store_test_results:
path: test/unit/_junit

- store_artifacts:
path: test/unit/_coverage
destination: TestCoverage

workflows:
version: 2

development:
jobs:
- build
- test:
requires:
- build
4 changes: 2 additions & 2 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
build:
environment:
php:
version: 7.2.0
version: 7.4
tests:
override:
-
command: 'vendor/bin/phpunit test/unit --coverage-clover coverage --whitelist src'
command: 'vendor/bin/phpunit test/phpunit --coverage-clover coverage --whitelist src'
coverage:
file: 'coverage'
format: 'php-clover'
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
],

"require": {
"php": ">=7.2",
"php": ">=7.4",
"ext-json": "*",
"phpgt/daemon": "*"
},
Expand All @@ -33,7 +33,7 @@
},
"autoload-dev": {
"psr-4": {
"Gt\\Cli\\Test\\": "./test/unit"
"Gt\\Cli\\Test\\": "./test/phpunit"
}
}
}
Loading

0 comments on commit 3432e0a

Please sign in to comment.