-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (43 loc) · 1.13 KB
/
ci.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
name: Test
on:
- push
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby_version:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
- '3.3'
gemfile:
- active_record-6.0
- active_record-7.0
- active_record-7.1
name: "${{ matrix.gemfile }} on Ruby ${{ matrix.ruby_version }}"
services:
db:
image: mariadb:10
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
ports:
- 3306:3306
env:
MYSQL_DATABASE: archiving_test
MYSQL_ALLOW_EMPTY_PASSWORD: 1
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
RAILS_ENV: test
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Set up database
working-directory: test/dummy
run: bundle exec rake db:migrate
- name: Run tests
run: bundle exec rake test