From 9a0a98857255ab4239e01485c57d06a3ec0bfeac Mon Sep 17 00:00:00 2001 From: evazion Date: Fri, 5 Feb 2021 02:49:00 -0600 Subject: [PATCH] tests: fix test breakage in Github CI. Fix tests not working in Github. They were failing because the latest version of Webpack needs a version of Node newer than the version in shipped Ubuntu 20.04. Also fix the Docker build failing because of the system timezone database not being installed in Ubuntu 20.10. --- .github/workflows/test.yaml | 2 +- Gemfile | 1 + Gemfile.lock | 3 +++ config/docker/Dockerfile.danbooru | 4 ++-- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index dadcae5a8..74d78e2bb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -12,7 +12,7 @@ on: jobs: test: runs-on: ubuntu-latest - container: ubuntu:20.04 + container: ubuntu:20.10 defaults: run: diff --git a/Gemfile b/Gemfile index 27c6cf9fb..20cc5c78c 100644 --- a/Gemfile +++ b/Gemfile @@ -45,6 +45,7 @@ gem 'pundit' gem 'mail' gem 'nokogiri' gem 'view_component', require: 'view_component/engine' +gem 'tzinfo-data' group :production, :staging do gem 'unicorn', :platforms => :ruby diff --git a/Gemfile.lock b/Gemfile.lock index 002f5c9f4..e139bf8a5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -387,6 +387,8 @@ GEM thor (1.1.0) tzinfo (2.0.4) concurrent-ruby (~> 1.0) + tzinfo-data (1.2021.1) + tzinfo (>= 1.0.0) unf (0.1.4) unf_ext unf_ext (0.0.7.7) @@ -485,6 +487,7 @@ DEPENDENCIES streamio-ffmpeg stripe stripe-ruby-mock + tzinfo-data unicorn unicorn-worker-killer view_component diff --git a/config/docker/Dockerfile.danbooru b/config/docker/Dockerfile.danbooru index dc9d7c61e..e0330a410 100644 --- a/config/docker/Dockerfile.danbooru +++ b/config/docker/Dockerfile.danbooru @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 AS build +FROM ubuntu:20.10 AS build RUN \ apt-get update && \ @@ -40,7 +40,7 @@ ARG RAILS_ENV=production RUN bin/rails assets:precompile && ln -sf packs public/packs-test RUN rm -rf node_modules log tmp && mkdir log tmp -FROM ubuntu:20.04 +FROM ubuntu:20.10 RUN \ useradd --create-home --user-group danbooru && \