Skip to content
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
62 changes: 20 additions & 42 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,39 @@
# Ruby CircleCI 2.0 configuration file
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
version: 2
version: 2.1
orbs:
browser-tools: circleci/browser-tools@1.4.8
node: circleci/node@5.2.0
ruby: circleci/ruby@2.1.2
jobs:
build:
docker:
# Specify the Ruby version you desire here
- image: cimg/ruby:3.1-browsers

working_directory: ~/identity-dev-docs
- image: cimg/ruby:3.2-browsers
environment:
BUNDLE_JOBS: '3'
BUNDLE_RETRY: '3'
steps:
- checkout

- run:
name: Switch Node.js version
command: |
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
export NVM_DIR="$HOME/.nvm"
. "$NVM_DIR/nvm.sh" --install --latest-npm
echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV;
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV;

- node/install
Copy link
Contributor

@aduth aduth Apr 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat, I didn't know CircleCI had built-in support for NVM! That feels a lot nicer / safer than running code directly from GitHub 😅 I wonder if that's always been a thing, or if it's a new feature.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this feature is relatively new. I forget when I first discovered it. Maybe in the past 2 years? It looks like the Node Orb was originally created in 2018, but I'm not sure if it had all of today's functionality back then.

- run:
name: Print Node.js version
command: node -v

- restore_cache:
key: v2-identity-dev-docs-{{ checksum "package-lock.json" }}-{{ checksum "Gemfile.lock" }}

- run:
name: Install dependencies
command: |
gem install bundler
bundle install --jobs=4 --retry=3 --path vendor/bundle
npm ci

# Store bundle cache
- save_cache:
key: v2-identity-dev-docs-{{ checksum "package-lock.json" }}-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
- ~/.npm

- checkout
- browser-tools/install-chromedriver
- node/install-packages
- ruby/install-deps
Comment on lines +23 to +24
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also didn't realize they had these conveniences with built-in caching 🎉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, and built-in test reporting as well.

- run:
name: Run Tests
name: Test Setup
command: |
make clean
make test
make build
- ruby/rspec-test:
include: spec/*_spec.rb
- run: npm run test

- run:
name: Run htmlproofer (no external links)
command: bundle exec scripts/htmlproofer --internal
- run:
name: Lint JavaScript
command: make lint-js

# collect reports
- store_test_results:
path: /tmp/test-results
- store_artifacts:
path: /tmp/test-results
destination: test-results
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.2
3.2.4
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
source 'https://rubygems.org'

ruby File.read('.ruby-version').strip

gem 'jekyll', '~> 4.3.0'
gem 'jekyll-sass-converter', '~> 3.0.0'
gem 'kramdown-parser-gfm', '~> 1.0'
Expand All @@ -9,5 +11,6 @@ gem 'jekyll-sitemap'
group :test do
gem 'html-proofer', '~> 4.0'
gem 'rspec'
gem 'rspec_junit_formatter', require: false
gem 'nokogiri', '>= 1.10.5'
end
63 changes: 35 additions & 28 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ GEM
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
colorator (1.1.0)
concurrent-ruby (1.2.2)
diff-lcs (1.4.4)
concurrent-ruby (1.2.3)
diff-lcs (1.5.1)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
Expand All @@ -14,7 +14,8 @@ GEM
eventmachine (1.2.7)
ffi (1.16.3)
forwardable-extended (2.6.0)
google-protobuf (3.22.2)
google-protobuf (4.26.1)
rake (>= 13)
html-proofer (4.4.3)
addressable (~> 2.3)
mercenary (~> 0.3)
Expand All @@ -25,9 +26,9 @@ GEM
yell (~> 2.0)
zeitwerk (~> 2.5)
http_parser.rb (0.8.0)
i18n (1.12.0)
i18n (1.14.4)
concurrent-ruby (~> 1.0)
jekyll (4.3.2)
jekyll (4.3.3)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
Expand Down Expand Up @@ -56,48 +57,50 @@ GEM
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.4)
listen (3.8.0)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
mini_portile2 (2.8.5)
nokogiri (1.16.2)
mini_portile2 (2.8.6)
nokogiri (1.16.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
parallel (1.24.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (5.0.4)
public_suffix (5.0.5)
racc (1.7.3)
rainbow (3.1.1)
rake (13.0.6)
rake (13.2.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (4.1.0)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
rexml (3.2.6)
rouge (4.2.1)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.2)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.2)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
safe_yaml (1.0.5)
sass-embedded (1.60.0)
google-protobuf (~> 3.21)
rake (>= 10.0.0)
sass-embedded (1.75.0)
google-protobuf (>= 3.25, < 5.0)
rake (>= 13.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
typhoeus (1.4.1)
ethon (>= 0.9.0)
unicode-display_width (2.4.2)
unicode-display_width (2.5.0)
webrick (1.8.1)
yell (2.2.2)
zeitwerk (2.6.12)
Expand All @@ -114,6 +117,10 @@ DEPENDENCIES
kramdown-parser-gfm (~> 1.0)
nokogiri (>= 1.10.5)
rspec
rspec_junit_formatter

RUBY VERSION
ruby 3.2.4p170

BUNDLED WITH
2.4.10
2.5.9
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@ defaults:
path: ''
values:
layout: documentation

excerpt_separator: <!--more-->
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"build:css": "build-sass assets/scss/*.scss --out-dir=_site/assets/css",
"watch:css": "npm run build:css -- --watch",
"pages": "npm run build:css",
"lint": "eslint ."
"lint": "eslint .",
"test": "node --test spec/e2e/**"
},
"repository": {
"type": "git",
Expand Down