-
Notifications
You must be signed in to change notification settings - Fork 65
85 lines (82 loc) · 3.03 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
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
name: test (ruby ${{ matrix.ruby }} / rails ${{ matrix.rails_version }} / blacklight ${{ matrix.blacklight_version }} ${{ matrix.additional_name }})
strategy:
matrix:
rails_version: ["~> 7.2"]
ruby: ["3.2", "3.3"]
bootstrap_version: ["~> 4.0"]
blacklight_version: ["~> 8.0"]
additional_engine_cart_rails_options: ["-a propshaft -j importmap"]
additional_name: [""]
include:
- rails_version: "~> 7.2"
ruby: "3.3"
blacklight_version: "~> 8.0"
bootstrap_version: "~> 5.0"
additional_name: Bootstrap 5
- rails_version: "7.1.4"
ruby: "3.2"
blacklight_version: "~> 8.0"
bootstrap_version: "~> 4.0"
additional_name: Rails 7.1
- rails_version: "~> 7.1.4"
ruby: "3.2"
blacklight_version: "~> 8.0"
bootstrap_version: "~> 4.0"
additional_engine_cart_rails_options: "-a propshaft -j esbuild"
additional_name: "JS bundling (esbuild) Bootstrap 4"
- rails_version: "~> 7.2"
ruby: "3.3"
blacklight_version: "~> 8.0"
bootstrap_version: "~> 5.0"
additional_engine_cart_rails_options: "-a propshaft -j esbuild"
additional_name: "JS bundling (esbuild) Bootstrap 5"
env:
RAILS_VERSION: ${{ matrix.rails_version }}
BLACKLIGHT_VERSION: ${{ matrix.blacklight_version }}
BOOTSTRAP_VERSION: ${{ matrix.bootstrap_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
# Remove these Chrome steps after https://issues.chromium.org/issues/351858989 is fixed
- name: Setup a specific version of Chrome
uses: browser-actions/setup-chrome@v1
id: setup-chrome
with:
chrome-version: 126
install-chromedriver: true
install-dependencies: true
- name: Set CHROME_BIN environment variable
run: echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> $GITHUB_ENV
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
bundler-cache: false
bundler: "latest"
ruby-version: ${{ matrix.ruby }}
- name: Change permissions
run: chmod -R o-w /opt/hostedtoolcache/Ruby/3.2.5/x64/lib/ruby/gems/3.2.0/gems
- name: Install dependencies
run: bundle install
- name: Run tests
run: bundle exec rake
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: false