Skip to content

Instantly share code, notes, and snippets.

@kobayashi
Created September 15, 2018 02:47
Show Gist options
  • Save kobayashi/d7a3111bfb67ee72c193b37f2f0c0fb4 to your computer and use it in GitHub Desktop.
Save kobayashi/d7a3111bfb67ee72c193b37f2f0c0fb4 to your computer and use it in GitHub Desktop.
Sample cofig.yml for testing gobuffalo
# Golang CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-go/ for more details
version: 2
jobs:
build:
docker:
- image: circleci/golang:1.10
- image: circleci/postgres:10.5-alpine-postgis-ram
environment:
POSTGRES_USER: << POSTGRES_USER >>
POSTGRES_DB: << POSTGRES_DB >>
working_directory: /go/src/github.com/<< ORGANIZATION_NAME >>/<< REPO_NAME >>
steps:
- checkout
# specify any bash command here prefixed with `run:
- run:
name: Update PATH and Define Environment Variable at Runtime
command: |
echo 'export PATH=${GOPATH}/bin/:${PATH}' >> $BASH_ENV
source $BASH_ENV
- run:
name: Install Packages
command: go get -v -t -d ./...
- run:
name: Install buffalo
command: go get -u -v github.com/gobuffalo/buffalo/buffalo
- run:
name: Waiting for Postgres to be ready
command: |
for i in `seq 1 10`;
do
nc -z localhost 5432 && echo Success && exit 0
echo -n .
sleep 1
done
echo Failed waiting for Postgres && exit 1
- run:
name: Run Test
command: buffalo test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment