version: 2
jobs:
  build:
    docker:
      - image: circleci/php:7.2
    steps:
      - checkout
  test:
    docker:
      - image: circleci/php:7.2
      - image: circleci/mysql:8.0.4
        environment:
          MYSQL_ALLOW_EMPTY_PASSWORD: true
          MYSQL_ROOT_PASSWORD:
          MYSQL_DATABASE: graphp
          MYSQL_USER: graphp
          MYSQL_PASSWORD: graphp
    steps:
      - checkout
      - run:
          name: "Pull Submodules"
          command: |
            git submodule init
            git submodule update --remote
      - run:
          name: "Update composer"
          command: |
            cd third_party
            php composer.phar update
      - run: graphp/tests/run_tests.sh
workflows:
  version: 2
  build_and_test:
    jobs:
      - build
      - test

version: 2
jobs:
  build:
    docker:
      - image: circleci/php:7.2
    steps:
      - checkout
  test:
    docker:
      - image: circleci/php:7.2
      - image: circleci/mysql:5.7
        environment:
          MYSQL_ALLOW_EMPTY_PASSWORD: true
          MYSQL_ROOT_PASSWORD:
          MYSQL_DATABASE: graphp
          MYSQL_USER: graphp
          MYSQL_PASSWORD: graphp
    steps:
      - checkout
      - run:
          name: "Pull Submodules"
          command: |
            git submodule init
            git submodule update --remote
      - run:
          name: "Update composer"
          command: |
            cd third_party
            php composer.phar update
      - run: graphp/tests/run_tests.sh
workflows:
  version: 2
  build_and_test:
    jobs:
      - build
      - test

Use MySQL version 5.7 for CI
Use MySQL version 5.7 for CI
