File: /home/artinside/www/finance/vendor/pagarme/pagarme-php/.circleci/config.yml
version: 2
workflows:
version: 2
test:
jobs:
- test-code-quality
- test-5.6
- test-7.0
- test-7.1
- test-7.2
jobs:
test-5.6: &test-template
docker:
- image: php:5.6-alpine
working_directory: ~/repo
steps:
- checkout
- run:
name: Install Composer
command: |
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
- run:
name: Install Dependencies
command: composer install -n --prefer-dist
- run:
name: PSR-2 Compliance
command: |
vendor/bin/phpcs --config-set ignore_warnings_on_exit 1
vendor/bin/phpcs src/ --standard=PSR2
vendor/bin/phpcs tests/ --standard=PSR2
- run:
name: Unit Tests
command: vendor/bin/phpunit
test-7.0:
<<: *test-template
docker:
- image: php:7.0-alpine
test-7.1:
<<: *test-template
docker:
- image: php:7.1-alpine
test-7.2:
<<: *test-template
docker:
- image: php:7.2-alpine
test-code-quality:
machine:
enabled: true
steps:
- checkout
- run:
name: 'Up and running php7'
command: 'docker-compose up'
- run:
name: 'Install dependencies'
command: 'docker-compose run php7 composer install -n --prefer-dist'
- run:
name: 'Finding for obvious and hard-to-spot bugs with Psalm PHP'
command: 'docker-compose run php7 psalm'