Skip to content

and once more

and once more #44

Workflow file for this run

# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
name: 100% Coverage
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
jobs:
build:
runs-on: ubuntu-latest
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/ruby_3_4.gemfile
GITHUB_ACTION: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 50
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Install Appraisal Gems
run: bundle exec rake install
- name: Run tests
run: bundle exec rake latest
- name: Assert 100% Test Coverage
run: >
ruby -e "require('json') &&
(rate = JSON.parse(File.read('coverage/.last_run.json'))['result']['line'].to_i) &&
(rate == 100 ? exit(0) : exit(rate))"