box: google/golang
# Services
services:
    - rethinkdb
# Build definition
build:
    # The steps that will be executed on build
    steps:
        - setup-go-workspace
        
        - script:
            name: set rethinkdb_url
            code: |
              export RETHINKDB_URL=$RETHINKDB_PORT_28015_TCP_ADDR

        # Gets the dependencies
        - script:
            name: get dependencies
            code: |
                go get ./...
        # Build the project
        - script:
            name: build
            code: |
                go build ./...
        # Test the project
        - script:
            name: Test
            code: |-
                go get -u gopkg.in/check.v1
                go test ./... -short
