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

Skip the gems in the :assets group in CI #252

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
env:
RAILS_ENV: test
DATABASE_URL: "postgresql://postgres:postgres@localhost:5432"
BUNDLE_WITHOUT: assets

steps:
- uses: actions/checkout@v3
Expand Down
32 changes: 16 additions & 16 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,19 @@ group :development, :test do
end


# Gems used only for assets and not required
# in production environments by default.
#group :assets do
gem 'sass'
gem 'sass-rails'
gem 'coffee-rails'
gem 'uglifier', '>=1.0.3'
# Provide a JS runtime to execjs without needing to
# have node, bun, or similar installed on the relevant
# server. We should write this out asap, along with the
# rest of the gems in this assets category, as bundling
# a version of libv8 into a rubygem is just security-vuln
# city, but hey, what can you do.
gem 'mini_racer', '~> 0.4.0'
gem 'yui-compressor'
#end
# Gems used only for precompiling assets. They may be skipped using
# `export BUNDLE_WITHOUT=assets` or `bundle config --local without assets`.
group :assets do
gem 'sass'
gem 'sass-rails'
gem 'coffee-rails'
gem 'uglifier', '>=1.0.3'
# Provide a JS runtime to execjs without needing to
# have node, bun, or similar installed on the relevant
# server. We should write this out asap, along with the
# rest of the gems in this assets category, as bundling
# a version of libv8 into a rubygem is just security-vuln
# city, but hey, what can you do.
gem 'mini_racer', '~> 0.4.0'
gem 'yui-compressor'
end
2 changes: 1 addition & 1 deletion script/install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ bash script/install/bundler.bash || exit 1

bash script/install/nokogiri.bash || exit 1 # nokogiri dependencies

bash script/install/jdk.bash || exit 1 # required by yui-compressor
[ -n "$CI" ] || bash script/install/jre.bash || exit 1 # required by yui-compressor; skip in CI

sudo bash script/install/isolate.bash || exit 1 # install isolate
sudo bash script/install/cgroup.bash || exit 1 # install cgroups
Expand Down
17 changes: 0 additions & 17 deletions script/install/jdk.bash

This file was deleted.

7 changes: 7 additions & 0 deletions script/install/jre.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

cmd="sudo apt-get install default-jre-headless" # java required by yui-compressor gem
echo "$ $cmd"
$cmd
[[ $? -le 1 ]] || exit 1 # apt-get exit 0 = success, 1 = decline, otherwise unknown error