Tests against different activerecord/activesupport versions #190
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |