simplymadeapps/simple_scheduler

View on GitHub
.github/workflows/tests.yml

Summary

Maintainability
Test Coverage
name: tests
on:
  pull_request:
  push:
    branches:
      - master
jobs:
  tests:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        ruby: [2.7.6, 3.0.4, 3.1.2]
    env:
      CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
      RAILS_ENV: test
    steps:
      - uses: actions/checkout@v2
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true # runs 'bundle install' and caches installed gems automatically
      - uses: supercharge/redis-github-action@1.4.0
      - name: Install Code Climate
        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: Appraisal Install
        run: bundle exec appraisal install

      - name: Rubocop
        run: bundle exec rubocop

      - name: Rspec
        run: bundle exec appraisal rspec

      - name: Code Climate
        run: ./cc-test-reporter after-build --exit-code $?