railstack/go-on-rails

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
# This test focuses on the generated Go codes to make things simple:
# 1. Ruby use v2.6.3, specified in .ruby-version configuration
# 2. Rails is v5.1.7, specified in Gemfile, it'll be installed by bundler
# 3. we just test MySQL database using the Travis-ci's default service version

language: go

# Here Go versions have to correspond with https://github.com/go-sql-driver/mysql/blob/master/.travis.yml
# if we hope a green tag in our README
go:
  - 1.10.x
  - 1.11.x
  - 1.12.x
  - 1.13.x
  - master

env:
  - RAILS_ENV=test

services:
  - mysql

before_install:
  - rvm install 2.6.3 --default
  - mysql -e 'CREATE DATABASE go_on_rails_test;'

install:
  - go get github.com/jmoiron/sqlx
  - go get github.com/go-sql-driver/mysql
  - go get github.com/asaskevich/govalidator
  - bundle install --jobs=3 --retry=3
  - rails db:migrate
  - rails db:seed
  - rails generate gor test

script: go test ./go_app/src/models