steps:
  build:
    image: golang
    commands:
      - go build
      - go test

services:
  database:
    image: mysql
    ports:
      - 3306
    entrypoint: ['entrypoint.sh']
    environment:
      MYSQL_DATABASE: test
      MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'

  cache:
    image: redis
    failure: ignore
    directory: /tmp/
    ports:
      - '6379'
