Coverage (#72) #100
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| ruby: | |
| - 3.0 | |
| - 3.1 | |
| - 3.2 | |
| - 3.3 | |
| - jruby | |
| - truffleruby | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - run: npm install -g tsx | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| - run: bundle exec standardrb | |
| - name: Run tests with coverage | |
| env: | |
| COVERAGE: 1 | |
| TEST_NODE_PARITY: 1 | |
| run: bundle exec rake test | |
| - name: Upload coverage to Codecov | |
| if: matrix.ruby == 3.3 | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage/coverage.json | |
| fail_ci_if_error: true |