Add coverage measurement and reporting #12
This file contains 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: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.3" | |
bundler-cache: true | |
- name: Lint Ruby code | |
run: bundle exec rubocop | |
linux: | |
name: Linux | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby: ['3.1', '3.2', '3.3', 'head'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Run tests | |
uses: paambaati/[email protected] | |
with: | |
coverageCommand: bundle exec rake spec | |
env: | |
CC_TEST_REPORTER_ID: 55b96e0bbf05e3116f96fbf32b5f29f45a01bbf01469046f38bb27703fb9b9c9 | |
macos: | |
name: macOS | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
ruby: ['3.1', '3.2', '3.3', 'head'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- run: bundle exec rake spec | |
windows: | |
name: Windows | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
ruby: ['3.1', '3.2', '3.3', 'head'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- run: bundle exec rake spec |