Tidy SimpleCov comments now that 1.0+ is the baseline #475
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 | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| ruby: ['4.0', '3.4'] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 # fetch all since test fixtures depend on history | |
| - name: Set up Ruby ${{ matrix.ruby }} | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| - name: Build and test with Rake | |
| run: | | |
| gem install bundler undercover --no-doc | |
| bundle install --jobs 4 --retry 3 | |
| rake | |
| - name: undercover (local) | |
| run: | | |
| git fetch --update-head-ok origin master:master | |
| undercover --simplecov coverage/undercover_coverage.json --compare master | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: undercover-${{ matrix.ruby }}-coverage | |
| path: coverage/undercover_coverage.json | |
| coverage: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: undercover-4.0-coverage | |
| - name: Upload coverage | |
| run: | | |
| output=$(ruby -e "$(curl -s https://undercover-ci.com/uploader.rb)" -- \ | |
| --repo grodowski/undercover \ | |
| --commit ${{ github.event.pull_request.head.sha || github.sha }} \ | |
| --simplecov /home/runner/work/undercover/undercover/undercover_coverage.json 2>&1) || { | |
| if echo "$output" | grep -q "has already completed"; then | |
| echo "Coverage already processed for this commit ✅" | |
| else | |
| echo "Coverage upload failed: $output" | |
| exit 1 | |
| fi | |
| } |