-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (32 loc) · 918 Bytes
/
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
name: CI
on:
push:
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['3.0', '3.1', '3.2', '3.3']
name: Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Set ENGINE_CART_RAILS_OPTIONS environment variable
run: echo "ENGINE_CART_RAILS_OPTIONS=--skip-javascript --skip-bundle" >> $GITHUB_ENV
- name: Install dependencies
run: |
if [[ "${{ matrix.ruby }}" == "3.0" || "${{ matrix.ruby }}" == "3.1" ]]; then
gem install uri -v '0.13.1'
fi
bundle install
- name: Run rubocop
run: rake rubocop
- name: Generate a Rails testing application
run: rake engine_cart:generate
- name: Run tests
run: rspec