Replace Travis-CI references by GHA. #14
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: Test | |
on: [push, pull_request] | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
entry: | |
- { ruby: '2.7.1', mongo: 'mongo:4.4', mongoid: '6' } | |
- { ruby: '3.0.5', mongo: 'mongo:4.4', mongoid: '6' } | |
- { ruby: '3.1.3', mongo: 'mongo:4.4', mongoid: '6' } | |
- { ruby: '2.7.1', mongo: 'mongo:4.4', mongoid: '7' } | |
- { ruby: '3.0.5', mongo: 'mongo:4.4', mongoid: '7' } | |
- { ruby: '3.1.3', mongo: 'mongo:4.4', mongoid: '7' } | |
- { ruby: '2.7.1', mongo: 'mongo:4.4', mongoid: '8' } | |
- { ruby: '3.0.5', mongo: 'mongo:4.4', mongoid: '8' } | |
- { ruby: '3.1.3', mongo: 'mongo:4.4', mongoid: '8' } | |
experimental: [false] | |
name: test (ruby=${{ matrix.entry.ruby }}, mongo=${{ matrix.entry.mongo }}, mongoid=${{ matrix.entry.mongoid }}) | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.experimental }} | |
services: | |
mongo: | |
image: ${{ matrix.entry.mongo }} | |
ports: ["27017:27017"] | |
env: | |
MONGOID_VERSION: ${{ matrix.entry.mongoid }} | |
COVERAGE: ${{ matrix.entry.coverage }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.entry.ruby }} | |
bundler-cache: true | |
- name: Bundle install | |
run: bundle install | |
- name: Run tests | |
run: bundle exec rspec | |
- name: Code Climate | |
if: ${{ env.CC_TEST_REPORTER_ID != '' && success() && matrix.entry.coverage == 'true' }} | |
uses: paambaati/[email protected] | |
env: | |
CC_TEST_REPORTER_ID: ${{ vars.CC_TEST_REPORTER_ID }} |