.circleci/config.yml

Summary

Maintainability
Test Coverage
version: 2.0
jobs:
  build:
    machine:
      image: ubuntu-2004:202010-01
    environment:
      CC_TEST_REPORTER_ID: 92c2782d1e89489b5e20279871453f009dcc6fdc35a1dd4004b2661e8c9623eb
    working_directory: ~/repo
    steps:
      - checkout
      - run:
          name: Setup DDEV
          command: |
            curl -LO https://raw.githubusercontent.com/drud/ddev/master/scripts/install_ddev.sh && bash install_ddev.sh
      - 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: |
            ddev start
            ddev xdebug
            ddev composer install
            ./cc-test-reporter before-build
            ddev exec ./vendor/bin/phpunit --testsuite all --coverage-clover clover.xml
            sed -i 's+/var/www/html/+/home/circleci/repo/+g' clover.xml
            ./cc-test-reporter after-build --coverage-input-type clover --exit-code $?