Skip to content

Commit

Permalink
Test for Ruby 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeiP committed Jan 3, 2022
1 parent dfef3f3 commit 9c56a31
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ["2.6", "2.7", "3.0"]
ruby: ["2.6", "2.7", "3.0", "3.1"]
db: [sqlite, mysql, postgres]
exclude:
- ruby: "2.6"
db: sqlite
- ruby: "2.6"
db: postgres
- ruby: "3.0"
db: sqlite
- ruby: "3.0"
db: postgres

steps:
- uses: actions/checkout@v1
Expand Down
30 changes: 30 additions & 0 deletions Dockerfile-3.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ruby:3.1

# throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1

WORKDIR /app

RUN touch /etc/app-env

RUN curl -sS https://dl.yarnpkg.com/debian/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 -y yarn

COPY Gemfile* /app/
RUN gem install bundler
RUN bundle install --jobs 4

RUN mkdir /app/log

COPY . /app/
COPY config/database.docker.yml /app/config/database.yml
COPY config/site.docker.yml /app/config/site.yml

RUN RAILS_ENV=production bundle exec rake assets:precompile

ENTRYPOINT ["/app/docker-entrypoint.sh"]

EXPOSE 3000

CMD ["rails", "server", "-b", "0.0.0.0"]
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
web:
build:
context: ..
dockerfile: Dockerfile-3.0
dockerfile: Dockerfile-3.1
environment:
# These are set in script/ci-build, so we need to pass-thru them.
RAILS_ENV: $RAILS_ENV
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
web:
build:
context: ..
dockerfile: Dockerfile-3.0
dockerfile: Dockerfile-3.1
environment:
# These are set in script/ci-build, so we need to pass-thru them.
RAILS_ENV: $RAILS_ENV
Expand Down

0 comments on commit 9c56a31

Please sign in to comment.