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

Start testing Ruby 3.3 #3006

Merged
merged 1 commit into from
Jun 6, 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
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ["3.0", "3.1", "3.2"]
ruby: ["3.0", "3.1", "3.2", "3.3"]
db: [sqlite, mysql, postgres]

steps:
Expand Down
30 changes: 30 additions & 0 deletions Dockerfile-3.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ruby:3.2

# 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"]
29 changes: 29 additions & 0 deletions test-envs/docker-compose-3.3-mysql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: '3'
services:
db:
image: mysql:5.7
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 1
MYSQL_DATABASE: ${TRACKS_DB:-tracks}
volumes:
- db-data:/var/lib/mysql
web:
build:
context: ..
dockerfile: Dockerfile-3.3
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: root
DATABASE_PASSWORD_EMPTY: 1
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:
32 changes: 32 additions & 0 deletions test-envs/docker-compose-3.3-postgres.yml
Original file line number Diff line number Diff line change
@@ -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.3
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:
17 changes: 17 additions & 0 deletions test-envs/docker-compose-3.3-sqlite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: '3'
services:
web:
build:
context: ..
dockerfile: Dockerfile-3.3
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