version: 2
jobs:
build_and_test:
docker:
- image: circleci/php:7.1
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "composer.json" }}
- v1-dependencies-
- run: composer install -n --prefer-dist
- save_cache:
paths:
- ./vendor
key: v1-dependencies-{{ checksum "composer.json" }}
- run: ./vendor/bin/phpunit
workflows:
build_test_and_deploy:
- build_and_test
nightly:
triggers:
- schedule:
cron: "0 4 * * *"
filters:
branches:
only: master