-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.24 KB
/
ci.yml
File metadata and controls
55 lines (45 loc) · 1.24 KB
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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
tests:
name: "Tests (Ruby ${{ matrix.ruby-version }}, Rails ${{ matrix.rails-version }})"
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.4', '4.0']
rails-version: ['7.2', '8.0', '8.1']
steps:
- uses: actions/checkout@v4
- name: "🔧 Set up Ruby ${{ matrix.ruby-version }}"
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: false
- name: "🗄️ Set up test database"
run: |
sudo apt-get update
sudo apt-get install -y sqlite3 libsqlite3-dev
- name: "📦 Install dependencies"
run: |
bundle config set frozen false
RAILS_VERSION=${{ matrix.rails-version }} bundle install
- name: "🧪 Run tests"
run: bundle exec rspec
env:
RAILS_VERSION: ${{ matrix.rails-version }}
code_quality:
name: "Code Quality"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "🔧 Set up Ruby"
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
bundler-cache: true
- name: "🔍 Run RuboCop"
run: bundle exec rubocop