nicholalexander/basket

View on GitHub
.github/workflows/main.yml

Summary

Maintainability
Test Coverage
name: Ruby

on: [push,pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    name: Ruby ${{ matrix.ruby }}
    strategy:
      fail-fast: false
      matrix:
        ruby:
          - '3.2.2'
          - '3.1.4'
          - '3.0.6'

    steps:
    - uses: actions/checkout@v3
    - name: Set up Ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby }}
        bundler-cache: true
    - name: Setup Code Climate test-reporter
      run: |
        curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
        chmod +x ./cc-test-reporter
        ./cc-test-reporter before-build
    - name: Run the default task
      run: bundle exec rake
    - name: Publish code coverage
      run: ./cc-test-reporter after-build -r ${{secrets.CODE_CLIMATE_REPORTER_ID}}