Skip to content

Guide for developers

mhadam edited this page Sep 10, 2018 · 9 revisions

Building

Assuming git, Vagrant and VirtualBox installed:

 host> git clone https://github.com/snowplow/sql-runner
 host> cd sql-runner
 host> vagrant up && vagrant ssh
guest> cd /opt/gopath/src/github.com/snowplow/sql-runner
guest> sudo su
guest> source ~/.profile
guest> dep ensure
guest> exit
guest> go build -o sql-runner ./sql_runner/

Testing

Assuming Building complete:

  1. Set the root dir of the project as an environment variable. If you are building out of Vagrant:
  • export TRAVIS_BUILD_DIR=/vagrant
  1. Run the setup script for local development:
  • ./integration/setup_local.sh
  1. Ensure requisite packages are installed.
  • dep ensure
  1. Run the project test suite:
  • go test ./sql_runner/
  1. Build SQL Runner:
  • go build -o sql-runner ./sql_runner/
  1. Run the integration test suite:
  • ./integration/run_tests.sh

Publishing

This is handled through CI/CD on Travis.

Clone this wiki locally