-
Notifications
You must be signed in to change notification settings - Fork 22
57 lines (43 loc) · 1.35 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
name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: [3.3.0, 3.2.3, 3.1.4, 3.0.6]
redis-version: [4, 5]
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: Install gems
run: bundle install && bundle exec appraisal install
- name: Compile and test beetle go binary
run: make && make test
- name: Run beetle gem tests
run: bundle exec rake test
env:
BUNDLE_GEMFILE: gemfiles/redis_${{ matrix.redis-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 }}.gemfile
- name: Stop services
run: docker compose down
if: always()