Skip to content

Commit

Permalink
set up gitpod builds for every PR (publiclab#8145)
Browse files Browse the repository at this point in the history
* test gitpod

* just checking gitpod

* changed version

* tasks gitpod

* gitpod.io

* initial setup

* db setup

* init update

* create db

* sql error

* gitpod test

* path issue

* Update .gitpod.yml

* Update .gitpod.yml

* removed .gitpod.dockerfile

* added gitpod.dockerfile

* passenger start added

* switch to mysql

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

Co-authored-by: Jeffrey Warren <[email protected]>
Co-authored-by: Sebastian Silva <[email protected]>
  • Loading branch information
3 people authored and manchere committed Feb 13, 2021
1 parent 094d7f8 commit 5fb0733
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitpod.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM gitpod/workspace-mysql
27 changes: 27 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
image:
file: .gitpod.dockerfile
ports:
- port: 3000
onOpen: open-preview
tasks:
- init: >
bundle install --without production &&
cp config/database.yml.gitpod config/database.yml &&
mysql -e "SET @@global.sql_mode=(SELECT REPLACE(@@global.sql_mode, 'ONLY_FULL_GROUP_BY', ''));" &&
mysql -e "CREATE DATABASE plots;" &&
cp db/schema.rb.example db/schema.rb &&
rake db:setup &&
yarn install
command: >
passenger start
github:
prebuilds:
branches: true
pullRequests: true
pullRequestsFromForks: true
addCheck: true
addComment: true
addBadge: false
addLabel: false
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sudo: required
language: ruby

rvm:
- 2.4.4
- 2.6.6

services:
- docker
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source 'https://rubygems.org'
ruby '2.4.4'
ruby '2.6.6'

git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ DEPENDENCIES
will_paginate-bootstrap4

RUBY VERSION
ruby 2.4.4p296
ruby 2.6.6p146

BUNDLED WITH
2.1.4
18 changes: 18 additions & 0 deletions config/database.yml.gitpod
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
development:
adapter: mysql2
username: root
password:
encoding: utf8
database: plots
strict: false

production:
adapter: sqlite3
database: production.sqlite

# Warning: The contents of the database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: sqlite3
database: test.sqlite

0 comments on commit 5fb0733

Please sign in to comment.