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

Implement GOV.UK Design System and update asset management #1116

Merged
merged 10 commits into from
Nov 15, 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
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ jobs:
with:
bundler-cache: true

- name: Install packages
run: yarn install --pure-lockfile

- name: Precompile assets
run: bin/rails assets:precompile

Expand Down Expand Up @@ -110,7 +113,7 @@ jobs:
uses: joshmfrankel/simplecov-check-action@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
minimum_suite_coverage: 73
minimum_suite_coverage: 84
minimum_file_coverage: 100

build-and-deploy:
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@ vendor
# Allow one tmp file
/tmp/*
!tmp/parallel_runtime_rspec.log

/public/assets
/node_modules

/app/assets/builds/*
!/app/assets/builds/.keep
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.4
3.3.5
16 changes: 11 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.1.4-alpine as base
FROM ruby:3.3.5-alpine as base

WORKDIR /app

Expand All @@ -15,17 +15,23 @@ FROM base as builder
RUN apk add --no-cache \
build-base \
ruby-dev \
postgresql-dev
postgresql-dev \
yarn

COPY Gemfile* .ruby-version ./
COPY Gemfile* .ruby-version package.json yarn.lock ./

RUN bundle config deployment true && \
bundle config without development test && \
bundle install --jobs 4 --retry 3
bundle install --jobs 4 --retry 3 && \
yarn install --frozen-lockfile --production

COPY . .

RUN RAILS_ENV=production PQ_REST_API_HOST=localhost PQ_REST_API_USERNAME=user PQ_REST_API_PASSWORD=pass DEVISE_SECRET=secret bundle exec rake assets:precompile
RUN RAILS_ENV=production PQ_REST_API_HOST=localhost PQ_REST_API_USERNAME=user PQ_REST_API_PASSWORD=pass \
SECRET_KEY_BASE_DUMMY=1 bundle exec rake assets:precompile

# Copy govuk assets
RUN cp -r node_modules/govuk-frontend/dist/govuk/assets/. public/assets/

# Cleanup to save space in the production image
RUN rm -rf node_modules log/* tmp/* /tmp && \
Expand Down
19 changes: 7 additions & 12 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,32 @@ source "https://rubygems.org"

ruby file: ".ruby-version"

gem "bootstrap-will_paginate", "~> 1.0"
gem "business_time", "~> 0.13.0"
gem "devise", "~> 4.8"
gem "devise_invitable", "~> 2.0"
gem "font-awesome-rails", "~> 4.7"
gem "govuk_elements_rails", "~> 3.1", ">= 3.1.3"
gem "govuk_frontend_toolkit", "~> 9.0"
gem "govuk-components"
gem "govuk_notify_rails", "~> 3.0"
gem "govuk_template", "~> 0.26.0"
gem "jquery-rails", "~> 4.6"
gem "logstasher", "~> 2.1", ">= 2.1.5"
gem "mail", ">= 2.8"
gem "mechanize", "~> 2.12"
gem "momentjs-rails", "~> 2.29"
gem "paper_trail"
gem "pg", "~> 1.5"
gem "puma", "~> 6.4"
gem "rails", "~> 7.1"
gem "responders", "~> 3.0", ">= 3.0.1"
gem "rspec_junit_formatter", "~> 0.6.0"
gem "sass-rails", "~> 6.0"
gem "select2-rails", "~> 4.0", ">= 4.0.13"
gem "sentry-rails", "~> 5.21"
gem "sentry-ruby", "~> 5.19"
gem "sidekiq"
gem "sinatra", "~> 3.1", require: false
gem "sinatra", "~> 4", require: false
gem "slim", "~> 5.2"
gem "statsd-ruby", "~> 1.5"
gem "terser"
gem "will_paginate", "~> 4.0"

gem "cssbundling-rails", "~> 1.4"
gem "jsbundling-rails", "~> 1.3"
gem "sprockets", "~> 4.2"
gem "sprockets-rails", "~> 3.5"

group :development do
gem "annotate"
end
Expand Down
Loading