Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 25 additions & 29 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,25 @@
#
version: 2
jobs:
build:
docker:
# Specify the version you desire here
- image: circleci/php:7.1-node-browsers

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# Using the RAM variation mitigates I/O contention
# for database intensive operations.
# - image: circleci/mysql:5.7-ram
#
# - image: redis:2.8.19
coverage:
docker:
- image: circleci/php:7.2-node-browsers
steps:
- run: 'bash <(curl -s https://codecov.io/bash)'

multi-test: &multi-test
docker:
- image: php
steps:
- checkout

- run: sudo apt update # PHP CircleCI 2.0 Configuration File# PHP CircleCI 2.0 Configuration File sudo apt install zlib1g-dev libsqlite3-dev
- run: sudo apt install zlib1g-dev libsqlite3-dev
- run: sudo apt update
- run: sudo apt install zlib1g-dev
- run: sudo docker-php-ext-install zip

# Download and cache dependencies
- restore_cache:
keys:
# "composer.lock" can be used if it is committed to the repo
- v1-dependencies-{{ checksum "composer.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: composer install -n --prefer-dist
Expand All @@ -48,21 +40,25 @@ jobs:
key: node-v1-{{ checksum "composer.json" }}
paths:
- node_modules
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this line for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Saves the node cache for yarn installed dependencies


# run tests with phpunit or codecept
#- run: 'if [[ ! ${TRAVIS_PHP_VERSION:0:3} < "5.5" ]]; then composer require overtrue/phplint; composer require squizlabs/php_codesniffer; ./vendor/bin/phplint; ./vendor/bin/phpcs; fi'
#- run: 'phpunit'
- run:
name: 'Running unit tests'
command: './vendor/bin/phpunit test'
- run:
name: 'Running E2E tests'
command: '.buildscript/e2e.sh'
- run:
when: on_success
name: 'Code coverage'
command: 'bash <(curl -s https://codecov.io/bash)'

#- run: ./vendor/bin/phpunit
#- run: ./vendor/bin/codecept build
#- run: ./vendor/bin/codecept run
test-php7.2:
<<: *multi-test
docker:
- image: circleci/php:7.2-node-browsers
test-php7.4:
<<: *multi-test
docker:
- image: circleci/php:7.4-node-browsers
workflows:
version: 2
multi-test:
jobs:
- coverage
- test-php7.2
- test-php7.4