phpvms/.circleci/config.yml

36 lines
1.3 KiB
YAML
Raw Normal View History

2018-05-17 21:02:43 +08:00
# PHP CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-php/ for more details
#
version: 2
jobs:
build:
2018-05-17 21:06:38 +08:00
docker: # run the steps with Docker
- image: circleci/php:7.1-node-browsers
2018-05-17 21:02:43 +08:00
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mysql:9.4
working_directory: ~/repo
steps:
2018-05-17 21:06:38 +08:00
- checkout # special step to check out source code to working directory
- run: sudo apt install -y libsqlite3-dev zlib1g-dev
- run: sudo docker-php-ext-install zip
- run: sudo composer self-update
- restore_cache: # special step to restore the dependency cache if `composer.lock` does not change
2018-05-17 21:02:43 +08:00
keys:
2018-05-17 21:06:38 +08:00
- composer-v1-{{ checksum "composer.lock" }}
- composer-v1-
2018-05-17 21:02:43 +08:00
- run:
- cp .travis/env.travis.php env.php
- composer install --dev --no-interaction --verbose
2018-05-17 21:06:38 +08:00
- save_cache: # special step to save the dependency cache with the `composer.lock` cache key template
key: composer-v1-{{ checksum "composer.lock" }}
2018-05-17 21:02:43 +08:00
paths:
2018-05-17 21:06:38 +08:00
- vendor
2018-05-17 21:02:43 +08:00
# run tests!
- run: vendor/bin/phpunit --debug --verbose