rebuild JS from ground up, prep major version #340
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake | |
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby | |
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
name: test (${{ matrix.blacklight_version && format('bl {0} / ', matrix.blacklight_version) }}rails ${{ matrix.rails_version }} / rb ${{ matrix.ruby }} ${{ matrix.additional_name }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
# We have SEVERAL axes of difference we support. | |
# | |
# * Blacklight: 7, 8, or 9 | |
# * Rails: 7 or 8 | |
# * sprockets or propshaft(with cssbundling-rails sass) | |
# * importmap-rails or esbuild (each with sprockets or importmaps) | |
# | |
# We should work with almost every combo of these (even though BL itself | |
# doesn't officially support every one), but we don't test with every one, | |
# that'd be too much. Plus BL can't *generate* every one even though it | |
# can be made to work with every one. We test with some good significant | |
# representative samples. | |
include: | |
# BLACKLIGHT 8, can use importmaps. Ideally would test with esbuild(etc) too, should | |
# work. Can test with Rails 8 too maybe at some point? | |
- rails_version: "7.2.1" | |
blacklight_version: "~> 8.0" | |
ruby: "3.3" | |
additional_name: "/ importmaps-rails, sprockets" | |
- rails_version: "7.2.1" | |
blacklight_version: "~> 8.0" | |
ruby: "3.3" | |
additional_name: "/ importmaps-rails, propshaft" | |
additional_engine_cart_rails_options: "-a propshaft --css=bootstrap" | |
# We can't currently test Blacklight 8 in a few situations we'd like to. | |
# | |
# 1. Can't test with Rails 8, because of current flappy test with Rails 8. | |
# https://github.com/projectblacklight/blacklight/pull/3361 -- as well | |
# as challenges mentioned below with using a git checkout of BL in tests. | |
# | |
# 2. Can't test with rails 7, esbuild, propshaft-- because unreleased | |
# fix in BL 8.x branch is required for that. https://github.com/projectblacklight/blacklight/pull/3357 | |
# It's not in a release, and we can't test pointing at JS in github | |
# becuase the package.json is not usable by yarn 1 from github, becuase | |
# it relies on a non-checked-in artifact created by `prepare` script, | |
# which yarn 1 does not run. :( | |
# | |
# 3. The BL8 installer itself can't currently succesfully install BL8 with | |
# Rails 7, sprockets, and esbuild -- although BL CAN work in that situation. | |
# | |
# I BELIEVE this code should actually work in those cases, but for | |
# testing challenges. | |
# BLACKLIGHT 7, only test with esbuild | |
- rails_version: "7.2.1" | |
blacklight_version: "~> 7.0" | |
ruby: "3.3" | |
additional_engine_cart_rails_options: "--javascript=esbuild" | |
additional_name: "/ esbuild, sprockets" | |
- rails_version: "7.2.1" | |
blacklight_version: "~> 7.0" | |
ruby: "3.3" | |
additional_engine_cart_rails_options: "--javascript=esbuild --css=bootstrap -a propshaft" | |
additional_name: "/ esbuild, propshaft" | |
- rails_version: "7.1.4" | |
blacklight_version: "~> 7.0" | |
ruby: "3.2" | |
additional_engine_cart_rails_options: "--javascript=esbuild" | |
additional_name: "/ esbuild, sprockets" | |
- rails_version: "7.0.8.4" | |
blacklight_version: "~> 7.0" | |
ruby: "3.1" | |
additional_engine_cart_rails_options: "--javascript=esbuild" | |
additional_name: "/ esbuild, sprockets" | |
env: | |
BLACKLIGHT_VERSION: ${{ matrix.blacklight_version || '~> 8.0' }} | |
RAILS_VERSION: ${{ matrix.rails_version }} | |
ENGINE_CART_RAILS_OPTIONS: "--skip-git --skip-listen --skip-spring --skip-keeps --skip-coffee --skip-test ${{ matrix.additional_engine_cart_rails_options }}" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler: "latest" | |
- name: Install dependencies | |
run: bundle install | |
- name: Run tests | |
run: bundle exec rake ci |