-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CircleCI: Use offical CircleCI PHP orb and next-gen docker images
- Loading branch information
Showing
1 changed file
with
45 additions
and
45 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,52 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
bedrock: | ||
executors: | ||
php-latest: | ||
docker: | ||
- image: 'circleci/php:latest' | ||
php-73: | ||
docker: | ||
- image: 'circleci/php:7.3-stretch' | ||
php-72: | ||
docker: | ||
- image: 'circleci/php:7.2-stretch' | ||
php-71: | ||
docker: | ||
- image: 'circleci/php:7.1-stretch' | ||
jobs: | ||
build-php: | ||
parameters: | ||
executor: | ||
type: executor | ||
executor: << parameters.executor >> | ||
steps: | ||
- run: php -v | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- composer-v1-{{ checksum "composer.lock" }} | ||
- composer-v1- | ||
- run: composer install -n --prefer-dist | ||
- run: composer test | ||
- save_cache: | ||
key: composer-v1-{{ checksum "composer.lock" }} | ||
paths: | ||
- vendor | ||
php: circleci/php@0.1 | ||
|
||
# To be removed after https://github.com/CircleCI-Public/php-orb/pull/11 | ||
executors: | ||
default: | ||
description: The official next-gen CircleCI PHP Docker image. | ||
parameters: | ||
tag: | ||
description: The `cimg/php` Docker image version tag. | ||
type: string | ||
docker: | ||
- image: "cimg/php:<< parameters.tag >>" | ||
|
||
# To be removed after https://github.com/CircleCI-Public/php-orb/issues/23 | ||
jobs: | ||
build-php: | ||
parameters: | ||
version: | ||
default: "7.4" | ||
description: The `cimg/php` Docker image version tag. | ||
type: string | ||
executor: | ||
name: default | ||
tag: << parameters.version >> | ||
steps: | ||
# Because squizlabs/php_codesniffer requires ext-simplexml. | ||
# To be removed after https://github.com/CircleCI-Public/cimg-php/pull/51 | ||
- run: sudo apt-get update | ||
- run: sudo apt-get install -y php<< parameters.version >>-xml | ||
- run: php -v | ||
- run: composer --version | ||
# To be removed after https://github.com/CircleCI-Public/cimg-php/pull/52 | ||
- run: mkdir -p $(composer global config cache-dir --absolute) | ||
- checkout | ||
- php/load-cache: | ||
key: v1 | ||
- run: composer install -n --prefer-dist | ||
- run: composer test | ||
- php/save-cache: | ||
key: v1 | ||
|
||
workflows: | ||
build: | ||
jobs: | ||
- bedrock/build-php: | ||
name: build-php-latest | ||
executor: bedrock/php-latest | ||
- bedrock/build-php: | ||
name: build-php-73 | ||
executor: bedrock/php-73 | ||
- bedrock/build-php: | ||
name: build-php-72 | ||
executor: bedrock/php-72 | ||
- bedrock/build-php: | ||
name: build-php-71 | ||
executor: bedrock/php-71 | ||
- build-php: | ||
name: build-php-<< matrix.version >> | ||
matrix: | ||
parameters: | ||
version: ["7.4", "7.3", "7.2"] |