Skip to content

Commit

Permalink
Enable postgres on Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
colszowka committed Oct 18, 2017
1 parent 77025e0 commit 51df85b
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 4 deletions.
13 changes: 10 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
language: ruby
script:
- bundle exec rspec

services:
- postgresql

addons:
postgresql: "9.6"

jobs:
include:
- stage: test
script: bundle exec rspec
before_script:
- bin/rails db:setup
script:
- bundle exec rspec
- script: bundle exec rubocop
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ end

group :test do
gem "rails-controller-testing"
gem "simplecov"
gem "simplecov", require: false
end

group :development do
Expand Down
2 changes: 2 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class Application < Rails::Application

config.lograge.enabled = true

config.active_record.schema_format = :sql

config.generators do |c|
# Don't generate system test files.
c.system_tests = nil
Expand Down
97 changes: 97 additions & 0 deletions db/structure.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;

--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
--

CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;


--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
--

COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';


SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: -; Tablespace:
--

CREATE TABLE ar_internal_metadata (
key character varying NOT NULL,
value character varying,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);


--
-- Name: rubygems; Type: TABLE; Schema: public; Owner: -; Tablespace:
--

CREATE TABLE rubygems (
name character varying NOT NULL,
downloads integer NOT NULL,
version character varying NOT NULL,
authors character varying,
bug_tracker_uri character varying,
changelog_uri character varying,
documentation_uri character varying,
homepage_uri character varying,
mailing_list_uri character varying,
source_code_uri character varying,
wiki_uri character varying,
info text,
github_repo character varying,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);


--
-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -; Tablespace:
--

CREATE TABLE schema_migrations (
version character varying NOT NULL
);


--
-- Name: ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--

ALTER TABLE ONLY ar_internal_metadata
ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key);


--
-- Name: schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--

ALTER TABLE ONLY schema_migrations
ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);


--
-- PostgreSQL database dump complete
--

SET search_path TO "$user",public;

INSERT INTO "schema_migrations" (version) VALUES
('20170504202906');


2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require "simplecov"

# This file was generated by the `rails generate rspec:install` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# The generated `.rspec` file contains `--require spec_helper` which will cause
Expand Down

0 comments on commit 51df85b

Please sign in to comment.