2019-02-28 13:06:31 +08:00
|
|
|
version: 2
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
frontend:
|
|
|
|
working_directory: ~/repo
|
|
|
|
docker:
|
|
|
|
- image: circleci/node:10
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
|
|
|
- v1-dependencies-{{ checksum "yarn.lock" }}
|
|
|
|
- v1-dependencies-
|
|
|
|
- run: yarn
|
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- node_modules
|
|
|
|
- ~/.yarn
|
|
|
|
key: v1-dependencies-{{ checksum "yarn.lock" }}
|
|
|
|
- run: yarn lint
|
|
|
|
- run: yarn test --coverage
|
|
|
|
- run: yarn codecov
|
|
|
|
|
2019-03-02 22:30:16 +08:00
|
|
|
composer:
|
2019-02-28 13:06:31 +08:00
|
|
|
working_directory: ~/repo
|
|
|
|
docker:
|
|
|
|
- image: blessingskin/ci:7.1
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
|
|
|
- v1-dependencies-{{ checksum "composer.lock" }}
|
|
|
|
- v1-dependencies-
|
|
|
|
- run: composer install -n --prefer-dist
|
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- vendor
|
|
|
|
key: v1-dependencies-{{ checksum "composer.lock" }}
|
|
|
|
- run: cp .env.testing .env
|
|
|
|
- run: php artisan key:random
|
|
|
|
- run: php artisan salt:random
|
|
|
|
- persist_to_workspace:
|
|
|
|
root: ~/repo
|
|
|
|
paths:
|
|
|
|
- .
|
|
|
|
|
2019-03-02 22:30:16 +08:00
|
|
|
php7.1:
|
2019-02-28 13:06:31 +08:00
|
|
|
working_directory: ~/repo
|
|
|
|
docker:
|
|
|
|
- image: blessingskin/ci:7.1
|
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
|
|
|
at: ~/repo
|
|
|
|
- run: touch storage/testing.sqlite
|
|
|
|
- run: ./vendor/bin/phpunit --coverage-clover=coverage.xml
|
|
|
|
- run: bash <(curl -s https://codecov.io/bash) -cF php
|
|
|
|
|
2019-03-02 22:30:16 +08:00
|
|
|
php7.2:
|
2019-02-28 13:06:31 +08:00
|
|
|
working_directory: ~/repo
|
|
|
|
docker:
|
|
|
|
- image: blessingskin/ci:7.2
|
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
|
|
|
at: ~/repo
|
|
|
|
- run: touch storage/testing.sqlite
|
|
|
|
- run: ./vendor/bin/phpunit
|
|
|
|
|
2019-03-02 22:30:16 +08:00
|
|
|
php7.3:
|
2019-02-28 13:06:31 +08:00
|
|
|
working_directory: ~/repo
|
|
|
|
docker:
|
|
|
|
- image: blessingskin/ci:7.3
|
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
|
|
|
at: ~/repo
|
|
|
|
- run: touch storage/testing.sqlite
|
|
|
|
- run: ./vendor/bin/phpunit
|
|
|
|
|
2019-03-14 15:44:41 +08:00
|
|
|
release:
|
|
|
|
working_directory: ~/workspace
|
|
|
|
docker:
|
2019-03-14 15:59:03 +08:00
|
|
|
- image: blessingskin/ci:release-tool
|
2019-03-14 15:44:41 +08:00
|
|
|
steps:
|
|
|
|
- run: git clone https://github.com/bs-community/release-tool.git .
|
2019-03-14 16:25:46 +08:00
|
|
|
- run: sh ./release.sh
|
2019-03-14 15:44:41 +08:00
|
|
|
|
2019-02-28 13:06:31 +08:00
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
install_and_test:
|
|
|
|
jobs:
|
|
|
|
- frontend
|
2019-03-02 22:30:39 +08:00
|
|
|
- composer
|
2019-03-02 22:30:16 +08:00
|
|
|
- php7.1:
|
2019-02-28 13:06:31 +08:00
|
|
|
requires:
|
2019-03-02 22:30:16 +08:00
|
|
|
- composer
|
|
|
|
- php7.2:
|
2019-02-28 13:06:31 +08:00
|
|
|
requires:
|
2019-03-02 22:30:16 +08:00
|
|
|
- composer
|
|
|
|
- php7.3:
|
2019-02-28 13:06:31 +08:00
|
|
|
requires:
|
2019-03-02 22:30:16 +08:00
|
|
|
- composer
|
2019-03-14 15:44:41 +08:00
|
|
|
- release:
|
|
|
|
requires:
|
|
|
|
- php7.1
|
|
|
|
- php7.2
|
|
|
|
- php7.3
|
|
|
|
- frontend
|
|
|
|
filters:
|
2019-03-14 16:25:46 +08:00
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
2019-03-14 15:44:41 +08:00
|
|
|
tags:
|
2019-03-14 15:59:03 +08:00
|
|
|
only: /^v\d+\.\d+\.\d+/
|