.circleci/config.yml
version: 2
jobs:
build:
docker:
- image: circleci/php:7.2.4-node-browsers
working_directory: ~/patreon-php
steps:
- checkout
- run: sudo composer self-update
- restore_cache:
keys:
- composer-v1-{{ checksum "composer.lock" }}
- composer-v1-
- run: composer install -n --prefer-dist
- save_cache:
key: composer-v1-{{ checksum "composer.lock" }}
paths:
- vendor
- run:
name: Setup Code Climate test-reporter
command: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
- run:
name: Run tests
command: |
sudo docker-php-ext-enable xdebug
./cc-test-reporter before-build
sudo vendor/bin/phpunit --coverage-clover clover.xml
./cc-test-reporter after-build --coverage-input-type clover --exit-code $?