ci: Use offical CircleCI PHP and Node orbs, and next-gen docker images (#2484)
This commit is contained in:
@@ -1,60 +1,23 @@
|
|||||||
version: 2.1
|
version: 2.1
|
||||||
|
|
||||||
orbs:
|
orbs:
|
||||||
sage:
|
node: circleci/node@3
|
||||||
executors:
|
php: circleci/php@1
|
||||||
node-10:
|
|
||||||
docker:
|
|
||||||
- image: 'circleci/node:10-stretch'
|
|
||||||
php-73:
|
|
||||||
docker:
|
|
||||||
- image: 'circleci/php:7.3-stretch'
|
|
||||||
php-72:
|
|
||||||
docker:
|
|
||||||
- image: 'circleci/php:7.2-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 --no-scripts --no-suggest
|
|
||||||
- run: composer lint
|
|
||||||
- save_cache:
|
|
||||||
key: composer-v1-{{ checksum "composer.lock" }}
|
|
||||||
paths:
|
|
||||||
- vendor
|
|
||||||
build-node:
|
|
||||||
executor: node-10
|
|
||||||
steps:
|
|
||||||
- run: yarn versions
|
|
||||||
- checkout
|
|
||||||
- restore_cache:
|
|
||||||
keys:
|
|
||||||
- node-v1-{{ checksum "yarn.lock" }}
|
|
||||||
- node-v1-
|
|
||||||
- run: yarn install --frozen-lockfile
|
|
||||||
- run: yarn run test
|
|
||||||
- run: yarn run build:production
|
|
||||||
- save_cache:
|
|
||||||
key: node-v1-{{ checksum "yarn.lock" }}
|
|
||||||
paths:
|
|
||||||
- node_modules
|
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
build:
|
build:
|
||||||
jobs:
|
jobs:
|
||||||
- sage/build-node
|
- node/test:
|
||||||
- sage/build-php:
|
name: node-<< matrix.version >>
|
||||||
name: build-php-73
|
pkg-manager: yarn
|
||||||
executor: sage/php-73
|
post-steps:
|
||||||
- sage/build-php:
|
- run: yarn run build:production
|
||||||
name: build-php-72
|
matrix:
|
||||||
executor: sage/php-72
|
parameters:
|
||||||
|
version: ["10.21", "12.18", "14.4"]
|
||||||
|
- php/test:
|
||||||
|
name: php-<< matrix.version >>
|
||||||
|
test-command: lint
|
||||||
|
matrix:
|
||||||
|
parameters:
|
||||||
|
version: ["7.2", "7.3", "7.4"]
|
||||||
|
|||||||
Reference in New Issue
Block a user