diff --git a/.circleci/config.yml b/.circleci/config.yml index 45f87283..a1f5230a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 - 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 - 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 diff --git a/.ruby-version b/.ruby-version index ef538c28..351227fc 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.1.2 +3.2.4 diff --git a/Gemfile b/Gemfile index 60b2d487..26dc7d60 100644 --- a/Gemfile +++ b/Gemfile @@ -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' @@ -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 diff --git a/Gemfile.lock b/Gemfile.lock index c0224e2e..176a5db0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -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) @@ -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) @@ -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) @@ -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 diff --git a/_config.yml b/_config.yml index da0d3678..ef5dbd4e 100644 --- a/_config.yml +++ b/_config.yml @@ -59,3 +59,5 @@ defaults: path: '' values: layout: documentation + +excerpt_separator: diff --git a/package.json b/package.json index fde16726..d19bddda 100644 --- a/package.json +++ b/package.json @@ -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",