saturnflyer/surrounded

View on GitHub
.github/workflows/test.yml

Summary

Maintainability
Test Coverage
name: CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: ['**']

jobs:
  tests:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        ruby: [ '2.7', '3.0', '3.1', '3.2' ]
    name: Ruby ${{ matrix.ruby }}
    steps:
    - uses: actions/checkout@v2
    - name: Set up Ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby }}
    - name: Install dependencies
      run: bundle install --jobs 4 --retry 3
    - uses: amancevice/setup-code-climate@v1
      with:
        cc_test_reporter_id: ${{ secrets.CC_TEST_REPORTER_ID }}
    - run: cc-test-reporter before-build
    - name: Run tests
      env:
        COVERALLS: true
      run: bundle exec rake
    - run: cc-test-reporter after-build
      if: ${{ github.event_name != 'pull_request' }}