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

Dockerize, Postgresize, Redisize, and Sidekiqize Tap #202

Merged
merged 1 commit into from
Jun 8, 2024
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
33 changes: 16 additions & 17 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,31 @@ on:
jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- run: RAILS_ENV=test bundle exec rake db:create
- run: RAILS_ENV=test bundle exec rake db:schema:load
- run: bundle exec rake
env:
COVERALLS_REPO_TOKEN : ${{ secrets.COVERALLS_REPO_TOKEN }}
- uses: actions/checkout@v4

- name: Build the stack
run: docker-compose up -d db-test

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- run: RAILS_ENV=test bundle exec rake db:create
- run: RAILS_ENV=test bundle exec rake db:schema:load
- run: bundle exec rake

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Lint with rubocop
env:
RAILS_ENV: "test"
run: |
bundle exec rubocop -c .rubocop.yml
bundle exec rubocop -c .rubocop.yml
29 changes: 29 additions & 0 deletions .irbrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# frozen_string_literal: true

require "rainbow/refinement"

if defined? Rails
using Rainbow

env_prompt = if Rails.env.development?
Rails.env[0..2].green
elsif Rails.env.production?
Rainbow(Rails.env.upcase).black.background(:red).bright.bold
else
Rails.env.magenta
end

prompt = "[%n]#{env_prompt}(#{Rainbow('%m').yellow}):%i"

IRB.conf[:PROMPT] ||= {}
IRB.conf[:PROMPT][:RAILS] = {
PROMPT_I: "#{prompt}> ",
PROMPT_S: "#{prompt}%l ",
PROMPT_C: "#{prompt}? ",
RETURN: "=> %s\n"
}

IRB.conf[:PROMPT_MODE] = :RAILS
end

IRB.conf[:USE_AUTOCOMPLETE] = ENV["IRB_USE_AUTOCOMPLETE"] == "true"
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.1
3.3.2
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ruby 3.3.1
ruby 3.3.2
yarn 1.22.19
nodejs 16.15.0
23 changes: 7 additions & 16 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ gem "cancancan", "~> 3.3"
# Default avatar for users
gem "identicon", "0.0.5"

# Run stuff in the background
gem "daemons", "~> 1.4"
gem "delayed_job", "~> 4.1"
gem "delayed_job_active_record"

# Needed for deployment somehow
gem "bcrypt_pbkdf"
gem "ed25519"
Expand All @@ -81,10 +76,11 @@ gem "sentry-rails"
gem "sentry-ruby"
gem "stackprof"

# Production dependencies
group :production do
gem "mysql2", "~> 0.5.3"
end
# Run stuff in background
gem "sidekiq", "~> 7.0"

# Use PostgreSQL as the database for Active Record
gem "pg"

# Test dependencies
group :test do
Expand All @@ -94,20 +90,15 @@ end

# Development dependencies
group :development do
# Use sqlite3 as the database for Active Record
gem "sqlite3", "~> 1.4"

# Annotates Rails/ActiveRecord Models, routes, fixtures, and others based on the database schema.
gem "annotate", "~> 3.1"

# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem "spring", "~> 3.0"

# Deployment
gem "capistrano"
gem "capistrano-asdf"
gem "capistrano-passenger"
gem "capistrano-rails"
gem "capistrano", "~> 3.17"
gem "capistrano-docker", github: "TomNaessens/capistrano-docker"

# Linting
gem "rubocop", "~> 1.30"
Expand Down
Loading