diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index f734c0afb..f54f08280 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: ["3.0"] + ruby: ["3.0", "3.1"] db: [sqlite, mysql, postgres] steps: diff --git a/Dockerfile b/Dockerfile index bca1e0be0..cbac9f7ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.7 +FROM ruby:3.0 # throw errors if Gemfile has been modified since Gemfile.lock RUN bundle config --global frozen 1 diff --git a/Dockerfile-3.0 b/Dockerfile-3.0 deleted file mode 100644 index 534d5c926..000000000 --- a/Dockerfile-3.0 +++ /dev/null @@ -1,30 +0,0 @@ -FROM ruby:3.0 - -# 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"] diff --git a/Dockerfile-2.6 b/Dockerfile-3.1 similarity index 98% rename from Dockerfile-2.6 rename to Dockerfile-3.1 index ee5f7de3f..13ee22a20 100644 --- a/Dockerfile-2.6 +++ b/Dockerfile-3.1 @@ -1,4 +1,4 @@ -FROM ruby:2.6 +FROM ruby:3.1 # throw errors if Gemfile has been modified since Gemfile.lock RUN bundle config --global frozen 1 diff --git a/Gemfile b/Gemfile index ca4748281..c2813691b 100644 --- a/Gemfile +++ b/Gemfile @@ -29,7 +29,7 @@ gem 'tracks-chartjs-ror' gem 'will_paginate' # See https://github.com/sstephenson/execjs#readme for more supported runtimes -gem 'therubyracer', group: :therubyracer +gem 'mini_racer', group: :therubyracer # Use --without argument to skip unnecessary drivers gem 'sqlite3', group: :sqlite diff --git a/Gemfile.lock b/Gemfile.lock index f01f1abf2..9b43940bc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -157,7 +157,7 @@ GEM mime-types terrapin (~> 0.6.0) language_server-protocol (3.17.0.3) - libv8 (3.16.14.19) + libv8-node (21.7.2.0) listen (3.8.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) @@ -177,6 +177,8 @@ GEM mini_mime (1.1.5) mini_portile2 (2.8.5) minitest (5.23.1) + mini_racer (0.12.0) + libv8-node (~> 21.7.2.0) minitest-stub-const (0.6) mocha (2.1.0) ruby2_keywords (>= 0.0.5) @@ -252,7 +254,6 @@ GEM rb-inotify (0.10.1) ffi (~> 1.0) rbs (2.8.4) - ref (2.0.0) regexp_parser (2.8.3) reverse_markdown (2.1.1) nokogiri @@ -326,9 +327,6 @@ GEM unicode-display_width (>= 1.1.1, < 3) terrapin (0.6.0) climate_control (>= 0.0.3, < 1.0) - therubyracer (0.12.3) - libv8 (~> 3.16.14.15) - ref thor (1.3.0) tilt (2.3.0) timeout (0.4.1) @@ -375,6 +373,7 @@ DEPENDENCIES jquery-ui-rails (~> 6.0.1) kt-paperclip (~> 7.2) listen + mini_racer minitest-stub-const mocha mysql2 (~> 0.5.5) @@ -393,7 +392,6 @@ DEPENDENCIES solargraph spring (~> 4) sqlite3 - therubyracer tolk (~> 5.0.1) tracks-chartjs-ror uglifier (>= 1.3.0) diff --git a/test-envs/docker-compose-3.0-mysql.yml b/test-envs/docker-compose-3.0-mysql.yml index 2cd0413fe..67e67f174 100644 --- a/test-envs/docker-compose-3.0-mysql.yml +++ b/test-envs/docker-compose-3.0-mysql.yml @@ -10,7 +10,7 @@ services: web: build: context: .. - dockerfile: Dockerfile-3.0 + dockerfile: Dockerfile environment: # These are set in script/ci-build, so we need to pass-thru them. RAILS_ENV: $RAILS_ENV diff --git a/test-envs/docker-compose-3.0-postgres.yml b/test-envs/docker-compose-3.0-postgres.yml index 0c6d9b03e..a66d41b21 100644 --- a/test-envs/docker-compose-3.0-postgres.yml +++ b/test-envs/docker-compose-3.0-postgres.yml @@ -10,7 +10,7 @@ services: web: build: context: .. - dockerfile: Dockerfile-3.0 + dockerfile: Dockerfile environment: # These are set in script/ci-build, so we need to pass-thru them. RAILS_ENV: $RAILS_ENV diff --git a/test-envs/docker-compose-3.0-sqlite.yml b/test-envs/docker-compose-3.0-sqlite.yml index ba4d37094..4fd50bd59 100644 --- a/test-envs/docker-compose-3.0-sqlite.yml +++ b/test-envs/docker-compose-3.0-sqlite.yml @@ -3,7 +3,7 @@ services: web: build: context: .. - dockerfile: Dockerfile-3.0 + dockerfile: Dockerfile environment: # These are set in script/ci-build, so we need to pass-thru them. RAILS_ENV: $RAILS_ENV diff --git a/test-envs/docker-compose-2.7-mysql.yml b/test-envs/docker-compose-3.1-mysql.yml similarity index 95% rename from test-envs/docker-compose-2.7-mysql.yml rename to test-envs/docker-compose-3.1-mysql.yml index 67e67f174..03f609e5d 100644 --- a/test-envs/docker-compose-2.7-mysql.yml +++ b/test-envs/docker-compose-3.1-mysql.yml @@ -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 diff --git a/test-envs/docker-compose-2.7-postgres.yml b/test-envs/docker-compose-3.1-postgres.yml similarity index 96% rename from test-envs/docker-compose-2.7-postgres.yml rename to test-envs/docker-compose-3.1-postgres.yml index a66d41b21..8c8267279 100644 --- a/test-envs/docker-compose-2.7-postgres.yml +++ b/test-envs/docker-compose-3.1-postgres.yml @@ -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 diff --git a/test-envs/docker-compose-2.7-sqlite.yml b/test-envs/docker-compose-3.1-sqlite.yml similarity index 93% rename from test-envs/docker-compose-2.7-sqlite.yml rename to test-envs/docker-compose-3.1-sqlite.yml index 4fd50bd59..925c1bc36 100644 --- a/test-envs/docker-compose-2.7-sqlite.yml +++ b/test-envs/docker-compose-3.1-sqlite.yml @@ -3,7 +3,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