Skip to content

Tidy SimpleCov comments now that 1.0+ is the baseline #475

Tidy SimpleCov comments now that 1.0+ is the baseline

Tidy SimpleCov comments now that 1.0+ is the baseline #475

Workflow file for this run

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
}