travis-ci/travis-migrations:.travis.yml@e5bd58f
language: ruby
group: edge
services:
- postgresql
addons:
- postgresql: "9.6"
cache:
directories:
- vendor/bundle
rvm: "2.7.5"
env:
- RAILS_ENV=test
- global:
- PATH=/snap/bin:$PATH
before_script:
- cp db/main/structure.sql db/main/structure-original.sql
- cp config/database.yml.travis config/database.yml
before_install:
- gem install bundler:2.3.7
after_success:
- script/upload_structure.rb
jobs:
include:
- stage: "Testing time"
script:
- bundle exec rspec spec
- script/validate_structure_file.rb db/main/structure-original.sql
- stage: "Ship to Quay.io"
before_script: echo skip
after_success: echo skip
script: make ship
if: (branch = master and type = push ) OR commit_message =~ /ship:docker/ OR env(SHIP_DOCKER) = true
Build Config
{
"language": "ruby",
"os": [
"linux"
],
"dist": "xenial",
"group": "edge",
"services": [
"postgresql"
],
"addons": {
"postgresql": "9.6"
},
"cache": {
"directories": [
"vendor/bundle"
]
},
"rvm": [
"2.7.5"
],
"env": "RAILS_ENV=test",
"before_script": [
"cp db/main/structure.sql db/main/structure-original.sql",
"cp config/database.yml.travis config/database.yml"
],
"before_install": [
"gem install bundler:2.3.7"
],
"after_success": [
"script/upload_structure.rb"
],
"jobs": {
"include": [
{
"stage": "Testing time",
"script": [
"bundle exec rspec spec",
"script/validate_structure_file.rb db/main/structure-original.sql"
]
},
{
"stage": "Ship to Quay.io",
"before_script": [
"echo skip"
],
"after_success": [
"echo skip"
],
"script": [
"make ship"
],
"if": "(branch = master and type = push ) OR commit_message =~ /ship:docker/ OR env(SHIP_DOCKER) = true"
}
]
}
}