-
Notifications
You must be signed in to change notification settings - Fork 256
98 lines (95 loc) · 3.36 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
# 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
- "release-*"
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler: "latest"
- name: Change permissions
run: "chmod -f -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 linter
run: bundle exec rake rubocop
test:
runs-on: ubuntu-latest
name: test (ruby ${{ matrix.ruby }} / rails ${{ matrix.rails_version }} ${{ matrix.additional_name }})
strategy:
matrix:
ruby: ["3.3"]
rails_version: ["7.0.8.4", "7.1.3.4", "7.2.0"]
bootstrap_version: [null]
view_component_version: ["~> 3.12"]
api: [null]
additional_engine_cart_rails_options: [""]
additional_name: [""]
include:
- ruby: "3.2"
rails_version: "6.1.7.8"
- ruby: "3.2"
rails_version: "7.0.8.4"
- ruby: "3.2"
rails_version: "7.1.3.4"
solr_version: "8.11.2"
additional_name: "Solr 8.11.2"
- ruby: "3.1"
rails_version: "7.1.3.4"
- ruby: "3.1"
rails_version: "7.1.3.4"
view_component_version: "~> 2.74"
additional_name: "/ ViewComponent 2"
- ruby: "3.1"
rails_version: "7.0.8.4"
additional_name: "/ Propshaft"
additional_engine_cart_rails_options: -a propshaft --css=bootstrap
- ruby: "3.1"
rails_version: "7.0.8.4"
bootstrap_version: "~> 4.0"
additional_name: "/ Bootstrap 4"
- ruby: "3.3"
rails_version: "7.1.3.4"
api: "true"
additional_engine_cart_rails_options: --api --skip-yarn
additional_name: "/ API"
env:
RAILS_VERSION: ${{ matrix.rails_version }}
SOLR_VERSION: ${{ matrix.solr_version || 'latest' }}
VIEW_COMPONENT_VERSION: ${{ matrix.view_component_version }}
BOOTSTRAP_VERSION: ${{ matrix.bootstrap_version }}
BLACKLIGHT_API_TEST: ${{ matrix.api }}
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:
bundler: "latest"
ruby-version: ${{ matrix.ruby }}
- name: Change permissions
run: "chmod -f -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 ci
docker_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build docker image
run: docker compose build app