Enable testing for Ruby 3.0

This commit is contained in:
Jyri-Petteri Paloposki 2022-01-03 12:21:42 +02:00
parent ff178d1490
commit 916ec5121d
6 changed files with 56 additions and 3 deletions

View file

@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ["2.6", "2.7"]
ruby: ["2.6", "2.7", "3.0"]
db: [sqlite, mysql, postgres]
exclude:
- ruby: "2.6"

View file

@ -1,4 +1,4 @@
FROM ruby:2.5
FROM ruby:3.0
# throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1

View file

@ -2,6 +2,10 @@ See doc/upgrading.md for the upgrade documentation!
## Version 2.6
## New features
* Ruby 3.0 is now supported.
## Removed features
* No longer supporting EOL Ruby 2.5

View file

@ -10,7 +10,7 @@ services:
web:
build:
context: ..
dockerfile: Dockerfile-2.5
dockerfile: Dockerfile-3.0
environment:
# These are set in script/ci-build, so we need to pass-thru them.
RAILS_ENV: $RAILS_ENV

View file

@ -0,0 +1,32 @@
version: '3'
services:
db:
image: postgres:13
environment:
POSTGRES_DB: ${DATABASE_NAME:-tracks}
POSTGRES_PASSWORD: password
volumes:
- db-data:/var/lib/postgresql/data
web:
build:
context: ..
dockerfile: Dockerfile-3.0
environment:
# These are set in script/ci-build, so we need to pass-thru them.
RAILS_ENV: $RAILS_ENV
DATABASE_NAME: $DATABASE_NAME
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: password
DATABASE_TYPE: postgresql
DATABASE_ENCODING: unicode
DATABASE_PORT: 5432
volumes:
- ${VOLUME:-..}:/app:Z
- ${VOLUME:-..}/config/database.docker.yml:/app/config/database.yml:Z
- ${VOLUME:-..}/config/site.docker.yml:/app/config/site.yml:Z
ports:
- 3000:3000
depends_on:
- db
volumes:
db-data:

View file

@ -0,0 +1,17 @@
version: '3'
services:
web:
build:
context: ..
dockerfile: Dockerfile-3.0
environment:
# These are set in script/ci-build, so we need to pass-thru them.
RAILS_ENV: $RAILS_ENV
DATABASE_NAME: "/app/db.sqlite"
DATABASE_TYPE: sqlite3
volumes:
- ${VOLUME:-..}:/app:Z
- ${VOLUME:-..}/config/database.docker.yml:/app/config/database.yml:Z
- ${VOLUME:-..}/config/site.docker.yml:/app/config/site.yml:Z
ports:
- 3000:3000