-
Notifications
You must be signed in to change notification settings - Fork 22
58 lines (44 loc) · 1.54 KB
/
build.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
name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: [3.1.6, 3.2.5, 3.3.4]
redis-version: [4, 5]
activerecord-version: [6.1.7.8, 7.0.8.4, 7.1.3.4]
steps:
- uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: '1.20.7'
- name: Install dependencies
run: sudo apt-get install redis
- name: Start required services
run: docker compose up -d
- name: Generate appraisal files
run: bundle install && bundle exec appraisal generate
- name: Compile and test beetle go binary
run: make && make test
- name: Install gems and run beetle gem tests
run: bundle install && bundle exec rake test
env:
BUNDLE_GEMFILE: gemfiles/redis_${{ matrix.redis-version }}_activerecord_${{ matrix.activerecord-version }}.gemfile
MINITEST_REPORTER: SpecReporter
- name: Run beetle failover tests
run: bundle exec cucumber --fail-fast || (tail -n 100 tmp/*.{log,output}; false)
env:
BUNDLE_GEMFILE: gemfiles/redis_${{ matrix.redis-version }}_activerecord_${{ matrix.activerecord-version }}.gemfile
- name: Stop services
run: docker compose down
if: always()