Increase coverage to 100% #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Ruby CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| rubocop: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| env: | |
| RUBOCOP_CACHE_ROOT: tmp/rubocop | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| - name: Setup RuboCop cache | |
| uses: actions/cache@v4 | |
| id: cache-rubocop | |
| with: | |
| path: ${{ env.RUBOCOP_CACHE_ROOT }} | |
| key: ${{ runner.os }}-rubocop-${{ hashFiles('Gemfile.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-rubocop- | |
| - name: Run RuboCop | |
| run: bundle exec rubocop --format github --format clang | |
| tests: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| env: | |
| COVER: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| - name: Run tests | |
| run: bundle exec rspec | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage | |
| path: coverage | |
| - name: Coveralls | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} |