Move default build to Ruby 3.3, test only MySQL for Rubies 3.1 & 3.2 (middle versions)

This commit is contained in:
Jyri-Petteri Paloposki 2024-06-17 12:46:16 +03:00
parent 6274e9e1d3
commit d5235e8c61
8 changed files with 8 additions and 102 deletions

View file

@ -9,6 +9,10 @@ jobs:
ruby: ["3.0", "3.1", "3.2", "3.3"]
db: [sqlite, mysql, postgres]
exclude:
- ruby: "3.1"
db: sqlite
- ruby: "3.1"
db: postgres
- ruby: "3.2"
db: sqlite
- ruby: "3.2"

View file

@ -1,4 +1,4 @@
FROM ruby:3.1
FROM ruby:3.3
# throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1
@ -8,7 +8,7 @@ WORKDIR /app
RUN touch /etc/app-env
COPY Gemfile* /app/
RUN gem install bundler -v 2.4.22
RUN gem install bundler
RUN bundle install --jobs 4
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -

View file

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

View file

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

View file

@ -1,32 +0,0 @@
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
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

@ -1,17 +0,0 @@
version: '3'
services:
web:
build:
context: ..
dockerfile: Dockerfile
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

View file

@ -1,32 +0,0 @@
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.2
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

@ -1,17 +0,0 @@
version: '3'
services:
web:
build:
context: ..
dockerfile: Dockerfile-3.2
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