Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace travis with github actions and heroku integration #1315

Merged
merged 4 commits into from
Jul 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: actions
on:
push:
branches:
- master
pull_request:
branches:
- "*"
jobs:
test:
runs-on: ubuntu-latest
env:
DATABASE_HOST: localhost
TZ: Asia/Tokyo
SCRIVITO_EMAIL: [email protected]
SCRIVITO_PASSWORD: testpassword
SCRIVITO_TENANT: ${{ secrets.SCRIVITO_TENANT }}
SCRIVITO_API_KEY: ${{ secrets.SCRIVITO_API_KEY }}
services:
db:
image: postgres:10.4-alpine
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.3
bundler-cache: true
- name: prepare db
run: |
bundle exec rails db:create
bundle exec rails db:setup
- name: rspec
run: bundle exec rails spec
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
web: bundle exec puma -C config/puma.rb
release: ./scripts/release.sh
8 changes: 4 additions & 4 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ default: &default
# For details on connection pooling, see Rails configuration guide
# http://guides.rubyonrails.org/configuring.html#database-pooling
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
username: <%= ENV.fetch('DATABASE_USER') { '' } %>
password: <%= ENV.fetch('DATABASE_PASSWORD') { '' } %>
host: <%= ENV.fetch('DATABASE_HOST') { '' } %>
port: <%= ENV.fetch('DATABASE_PORT') { '' } %>
username: <%= ENV.fetch('DATABASE_USER') { 'postgres' } %>
password: <%= ENV.fetch('DATABASE_PASSWORD') { 'password' } %>
host: <%= ENV.fetch('DATABASE_HOST') { 'db' } %>
port: <%= ENV.fetch('DATABASE_PORT') { '5432' } %>

development:
<<: *default
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
depends_on:
- db
db:
image: "postgres:10.4"
image: "postgres:10.4-alpine"
environment:
- "POSTGRES_USER=postgres"
- "POSTGRES_PASSWORD=password"
Expand Down
7 changes: 7 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
set -e

bundle exec rails db:migrate
bundle exec rails db:seed
bundle exec rails dojos:update_db_by_yaml
bundle exec rails dojo_event_services:upsert
bundle exec rails podcasts:upsert