-
Notifications
You must be signed in to change notification settings - Fork 41
139 lines (115 loc) · 5.37 KB
/
ruby.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# 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 EDGE, can test with Rails 8 beta, importmap and esbuild
#
- rails_version: "~> 8.0.0"
blacklight_version: '{ "git": "https://github.com/projectblacklight/blacklight.git" }'
ruby: "3.3"
additional_name: "/ importmap-rails"
additional_engine_cart_rails_options: "--css=bootstrap"
- rails_version: "~> 8.0.0"
blacklight_version: '{ "git": "https://github.com/projectblacklight/blacklight.git" }'
ruby: "3.3"
additional_name: "/ esbuild"
additional_engine_cart_rails_options: "--css=bootstrap --javascript=esbuild"
# BLACKLIGHT 8, can test with use importmaps and esbuild
#
- rails_version: "7.2.1"
blacklight_version: "~> 8.0"
ruby: "3.3"
additional_name: "/ importmap-rails, sprockets"
- rails_version: "7.2.1"
blacklight_version: "~> 8.0"
ruby: "3.3"
additional_name: "/ importmap-rails, propshaft"
additional_engine_cart_rails_options: "-a propshaft --css=bootstrap"
- rails_version: "7.2.1"
blacklight_version: "~> 8.0"
ruby: 3.3
additional_engine_cart_rails_options: "-a propshaft --javascript=esbuild --css=bootstrap"
additional_name: "/ esbuild, propshaft"
# We can't currently test Blacklight 8 in a few situations we'd like to.
#
# * Blacklight 8 can't easily generate an app with Rails 7 and sprockets and esbuild
# (the default layout won't be right), although I think it should work fine.
#
# * Can't test with unreleaed Blacklight main and esbuild because the blacklight-frontend
# npm package doens't work from git checkout. So currently can't test with Rails8
# and esbuild.
# BLACKLIGHT 7, only test with esbuild, not sure if it supports importmaps, it won't generate it
- 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@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler: "latest"
- name: Install dependencies
run: bundle install
# Try to cache solr dist download, which may not save us much time,
# but hopes to save us from being throttled/blocked on some runs by
# apache foundation servers unhappy that we're downloading the dist zip
# so much.
- name: Cache solr install
uses: actions/cache@v3
with:
# these paths specified in .solr_wrapper.yml:
path: |
ci_dl_solr_dist
key: ${{ runner.os }}-solr-${{ hashFiles('.solr_wrapper.yml') }}
- name: Run tests
run: bundle exec rake ci