MailToolbox/mail_plugger

View on GitHub
.github/workflows/mail_plugger_ci.yml

Summary

Maintainability
Test Coverage
name: MailPlugger CI

on: [push, pull_request]

jobs:
  test-with-ruby:
    runs-on: ubuntu-latest

    env:
      CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}

    strategy:
      matrix:
        ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3']

    steps:
    - uses: actions/checkout@v1

    - name: Setup Ruby ${{ matrix.ruby-version }}
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby-version }}

    - 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: Install dependencies
      run: |
        bundle install
        bundle exec appraisal install

    - name: Run tests
      run: bundle exec appraisal rake

    - name: Publish code coverage
      run: ./cc-test-reporter after-build