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

update to ruby 2.7 #247

Merged
merged 4 commits into from
May 31, 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
44 changes: 24 additions & 20 deletions .docker-config/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@
FROM ruby:2.5.1
FROM ruby:2.7.2

RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && \
RUN wget https://dl.yarnpkg.com/debian/pubkey.gpg
RUN curl https://deb.nodesource.com/setup_14.x | bash
RUN cat pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && \
apt-get install -qq -y build-essential libpq-dev \
postgresql-client nodejs yarn \
wget xvfb unzip && \
rm -rf /var/lib/apt/lists/*

ENV BUNDLER_VERSION='1.17.3'
RUN gem install bundler:1.17.3
# remove pubkey
RUN rm pubkey.gpg

RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | \
apt-key add - && \
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> \
/etc/apt/sources.list.d/google.list && \
apt-get update -y && \
apt-get install -y google-chrome-stable && \
rm -rf /var/lib/apt/lists/*
ENV BUNDLER_VERSION='2.4.13'
RUN gem install bundler:2.4.13

# RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | \
# apt-key add - && \
# echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> \
# /etc/apt/sources.list.d/google.list && \
# apt-get update -y && \
# apt-get install -y google-chrome-stable && \
# rm -rf /var/lib/apt/lists/*

ENV CHROMEDRIVER_VERSION 2.19
ENV CHROMEDRIVER_DIR /chromedriver
# ENV CHROMEDRIVER_VERSION 2.19
# ENV CHROMEDRIVER_DIR /chromedriver

RUN mkdir $CHROMEDRIVER_DIR && \
wget -q --continue -P $CHROMEDRIVER_DIR "http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip" && \
unzip $CHROMEDRIVER_DIR/chromedriver* -d $CHROMEDRIVER_DIR
# RUN mkdir $CHROMEDRIVER_DIR && \
# wget -q --continue -P $CHROMEDRIVER_DIR "http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip" && \
# unzip $CHROMEDRIVER_DIR/chromedriver* -d $CHROMEDRIVER_DIR

ENV PATH $CHROMEDRIVER_DIR:$PATH
# ENV PATH $CHROMEDRIVER_DIR:$PATH

WORKDIR /usr/src/app
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:

env:
RAILS_ENV: test
DATABASE_URL: "postgresql://root@localhost/adventure-time_test?pool=5"
DATABASE_URL: "postgresql://root:password@localhost/adventure-time_test?pool=5"
TZ: "/usr/share/zoneinfo/America/New_York"
COV: '1'
BUNDLER_PATH: vendor/bundle
Expand All @@ -16,11 +16,11 @@ jobs:

services:
postgres:
image: postgres:10.1-alpine
image: postgres:14.12-alpine
env:
POSTGRES_USER: root
POSTGRES_DB: adventure-time_test
POSTGRES_PASSWORD: ""
POSTGRES_PASSWORD: password
ports:
- 5432:5432
# Add a health check
Expand All @@ -30,7 +30,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up ruby 2.5.1
- name: Set up ruby 2.7.2
uses: ruby/setup-ruby@v1

- name: Set up Ruby dependencies
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.1
2.7.2
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ruby 2.5.1
ruby 2.7.2
nodejs 14.17.0
yarn 1.22.19
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.5.1'
ruby '2.7.2'

gem 'awesome_print'
gem 'bcrypt'
Expand Down Expand Up @@ -43,6 +43,7 @@ group :test do
gem 'capybara', '>= 2.15'
gem 'database_cleaner', '~> 0.9.1'
gem "factory_bot_rails"
gem 'factory_bot', '6.4.4'
gem 'selenium-webdriver'
gem 'simplecov', require: false
gem 'webdrivers', '< 4.1'
Expand Down
Loading
Loading