diff --git a/.circleci/config.yml b/.circleci/config.yml index 4918d10..fcdf082 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 @@ -48,21 +40,25 @@ jobs: key: node-v1-{{ checksum "composer.json" }} paths: - node_modules - - # 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 \ No newline at end of file + 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 \ No newline at end of file