andriy-baran/nina

View on GitHub
.github/workflows/main.yml

Summary

Maintainability
Test Coverage
name: Ruby

on:
  push:
    branches:
      - master

  pull_request:

jobs:
  build:
    runs-on: ubuntu-latest
    name: Ruby ${{ matrix.ruby }}
    strategy:
      matrix:
        ruby:
          - '3.1.3'

    steps:
    - uses: actions/checkout@v2
    - name: Set up Ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: 3.0.0
    - name: Install dependencies
      run: |
        gem install bundler -v 2.2.3
        bundle install
    - 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
      env:
        CC_TEST_REPORTER_ID: 358500218b79ee16ee83a03923f70acfd29c7434b07575f23af10fb21779f2d8
      run: bundle exec rake
    - name: Publish code coverage
      run: |
        export GIT_BRANCH="master"
        pwd
        ls -l coverage
        ./cc-test-reporter after-build -d -t simplecov -r 358500218b79ee16ee83a03923f70acfd29c7434b07575f23af10fb21779f2d8