name: CI on: [push, pull_request] jobs: test: strategy: matrix: pg: - 11 - 12 - 13 - 14 - 15 ruby: - 3.0 - 3.1 - 3.2 gemfile: - rails_6.1 - rails_7.0 name: PostgreSQL ${{ matrix.pg }} - Ruby ${{ matrix.ruby }} - ${{ matrix.gemfile }} runs-on: ubuntu-latest env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile ImageOS: ubuntu20 steps: - uses: actions/checkout@v3 - name: Build postgres image and start the container run: docker-compose up -d --build env: PGVERSION: ${{ matrix.pg }} - name: Setup Ruby using .ruby-version file uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically - run: bundle exec rake spec