Skip to content

Ignore Gemfile.lock #324

Ignore Gemfile.lock

Ignore Gemfile.lock #324

Workflow file for this run

name: Test
on: push
jobs:
test:
runs-on: ubuntu-22.04
name: Ruby ${{ matrix.ruby-version }}
strategy:
matrix:
ruby-version:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Install cc-test-reporter
run: |
curl -Lo cc-test-reporter https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
chmod +x cc-test-reporter
- run: ./cc-test-reporter before-build
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
- run: bundle exec rake
env:
CC_TEST_REPORTER_ID: dummy # https://github.com/codeclimate/test-reporter/issues/495
- name: Format coverage
run: ./cc-test-reporter format-coverage --input-type simplecov --output 'codeclimate-${{ matrix.ruby-version }}.json'
- uses: actions/upload-artifact@v4
with:
name: coverages-ruby-${{ matrix.ruby-version }}
path: codeclimate-${{ matrix.ruby-version }}.json
upload-coverage:
runs-on: ubuntu-22.04
needs: test
steps:
- uses: actions/download-artifact@v4
with:
pattern: coverages-*
merge-multiple: true
- name: Install cc-test-reporter
run: |
curl -Lo cc-test-reporter https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
chmod +x cc-test-reporter
- name: Upload coverage
run: ./cc-test-reporter sum-coverage --output - codeclimate-*.json | ./cc-test-reporter upload-coverage --debug --input -
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}