AMD64
Ruby: 3.2.2
Git
travis-ci/travis-migrations:.travis.yml@eceffad
language: ruby
services:
- postgresql
addons:
- postgresql: "11"
cache:
directories:
- vendor/bundle
rvm: "3.2.2"
env:
- RAILS_ENV=test
- global:
- PATH=/snap/bin:$PATH
before_install:
- 'gem install bundler -v 2.4.17'
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"
dist: focal
language: ruby
addons:
postgresql: "11"
apt:
sources:
- sourceline: 'deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main'
key_url: 'https://www.postgresql.org/media/keys/ACCC4CF8.asc'
packages:
- postgresql-11
- postgresql-client-11
before_install:
- gem update --system
- sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/11/main/pg_hba.conf
- sudo sed -i -e 's/^port = 5433/port = 5432/' /etc/postgresql/11/main/postgresql.conf
- sudo systemctl restart postgresql@11-main
before_script:
- psql --version
- psql -c 'CREATE DATABASE travis_test;'
- curl -fs https://raw.githubusercontent.com/travis-ci/travis-migrations/master/db/main/structure.sql | psql -v ON_ERROR_STOP=1 travis_test
script:
- bundle exec rspec spec
- stage: "Ship to Quay.io"
dist: focal
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
before_install:
- gem install rubygems-update -v 3.3.27
Build Config
{
"language": "ruby",
"os": [
"linux"
],
"dist": "xenial",
"services": [
"postgresql"
],
"addons": {
"postgresql": "11"
},
"cache": {
"directories": [
"vendor/bundle"
]
},
"rvm": [
"3.2.2"
],
"env": "RAILS_ENV=test",
"before_install": [
"gem install rubygems-update -v 3.3.27"
],
"before_script": [
"cp db/main/structure.sql db/main/structure-original.sql",
"cp config/database.yml.travis config/database.yml"
],
"after_success": [
"script/upload_structure.rb"
],
"jobs": {
"include": [
{
"stage": "Testing time",
"dist": "focal",
"language": "ruby",
"addons": {
"postgresql": "11",
"apt": {
"sources": [
{
"sourceline": "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main",
"key_url": "https://www.postgresql.org/media/keys/ACCC4CF8.asc"
}
],
"packages": [
"postgresql-11",
"postgresql-client-11"
]
}
},
"before_install": [
"gem update --system",
"sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\\|md5/trust/g' /etc/postgresql/11/main/pg_hba.conf",
"sudo sed -i -e 's/^port = 5433/port = 5432/' /etc/postgresql/11/main/postgresql.conf",
"sudo systemctl restart postgresql@11-main"
],
"before_script": [
"psql --version",
"psql -c 'CREATE DATABASE travis_test;'",
"curl -fs https://raw.githubusercontent.com/travis-ci/travis-migrations/master/db/main/structure.sql | psql -v ON_ERROR_STOP=1 travis_test"
],
"script": [
"bundle exec rspec spec"
]
},
{
"stage": "Ship to Quay.io",
"dist": "focal",
"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"
}
]
}
}