MaximeD/gem_updater

View on GitHub
.github/workflows/ruby.yml

Summary

Maintainability
Test Coverage
name: Ruby

on: push

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        ruby: ['3.0', '3.1', '3.2', '3.3']
    steps:
    - uses: actions/checkout@v4
    - name: Set up Ruby ${{ matrix.ruby }}
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby }}
    - name: Install dependencies
      run: bundle install
    - name: Run tests
      # Exclude acceptance specs as github action fails due to:
      # It is a security vulnerability to allow your home directory to be world-writable, and bundler cannot continue.
      run: bundle exec rspec --exclude-pattern "spec/acceptance/**/*_spec.rb"
    - name: Run linter
      run: make lint

    - name: Report coverage
      uses: codacy/codacy-coverage-reporter-action@v1
      with:
        project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
        coverage-reports: coverage/coverage.xml