Skip to content

Commit cd8c268

Browse files
authored
Merge pull request #1315 from coderdojo-japan/actions
2 parents a484df6 + 3b9268b commit cd8c268

File tree

6 files changed

+53
-44
lines changed

6 files changed

+53
-44
lines changed

.github/workflows/test.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: actions
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- "*"
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
env:
13+
DATABASE_HOST: localhost
14+
TZ: Asia/Tokyo
15+
SCRIVITO_EMAIL: test@example.com
16+
SCRIVITO_PASSWORD: testpassword
17+
SCRIVITO_TENANT: ${{ secrets.SCRIVITO_TENANT }}
18+
SCRIVITO_API_KEY: ${{ secrets.SCRIVITO_API_KEY }}
19+
services:
20+
db:
21+
image: postgres:10.4-alpine
22+
ports:
23+
- 5432:5432
24+
env:
25+
POSTGRES_USER: postgres
26+
POSTGRES_PASSWORD: password
27+
steps:
28+
- uses: actions/checkout@v2
29+
with:
30+
fetch-depth: 1
31+
- uses: ruby/setup-ruby@v1
32+
with:
33+
ruby-version: 2.7.3
34+
bundler-cache: true
35+
- name: prepare db
36+
run: |
37+
bundle exec rails db:create
38+
bundle exec rails db:setup
39+
- name: rspec
40+
run: bundle exec rails spec

.travis.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
web: bundle exec puma -C config/puma.rb
2+
release: ./scripts/release.sh

config/database.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ default: &default
2020
# For details on connection pooling, see Rails configuration guide
2121
# http://guides.rubyonrails.org/configuring.html#database-pooling
2222
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
23-
username: <%= ENV.fetch('DATABASE_USER') { '' } %>
24-
password: <%= ENV.fetch('DATABASE_PASSWORD') { '' } %>
25-
host: <%= ENV.fetch('DATABASE_HOST') { '' } %>
26-
port: <%= ENV.fetch('DATABASE_PORT') { '' } %>
23+
username: <%= ENV.fetch('DATABASE_USER') { 'postgres' } %>
24+
password: <%= ENV.fetch('DATABASE_PASSWORD') { 'password' } %>
25+
host: <%= ENV.fetch('DATABASE_HOST') { 'db' } %>
26+
port: <%= ENV.fetch('DATABASE_PORT') { '5432' } %>
2727

2828
development:
2929
<<: *default

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ services:
1616
depends_on:
1717
- db
1818
db:
19-
image: "postgres:10.4"
19+
image: "postgres:10.4-alpine"
2020
environment:
2121
- "POSTGRES_USER=postgres"
2222
- "POSTGRES_PASSWORD=password"

scripts/release.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
set -e
2+
3+
bundle exec rails db:migrate
4+
bundle exec rails db:seed
5+
bundle exec rails dojos:update_db_by_yaml
6+
bundle exec rails dojo_event_services:upsert
7+
bundle exec rails podcasts:upsert

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy