11# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
22# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
33
4- name : TestSpace Coverage
4+ name : 100% Coverage
55
66on :
77 push :
@@ -14,30 +14,28 @@ jobs:
1414 runs-on : ubuntu-latest
1515
1616 env : # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
17- BUNDLE_GEMFILE : ${{ github.workspace }}/ruby_3_2.gemfile
17+ BUNDLE_GEMFILE : ${{ github.workspace }}/ruby_3_3.gemfile
18+ GITHUB_ACTION : true
1819
1920 steps :
20- - uses : actions/checkout@v3
21+ - uses : actions/checkout@v4
2122 with :
2223 fetch-depth : 50
2324
2425 - name : Set up Ruby
2526 uses : ruby/setup-ruby@v1
2627 with :
27- ruby-version : ' 3.2 ' # Not needed with a .ruby-version file
28+ ruby-version : ' 3.3 ' # Not needed with a .ruby-version file
2829 bundler-cache : true # runs 'bundle install' and caches installed gems automatically
2930
3031 - name : Install Appraisal Gems
3132 run : bundle exec rake install
3233
3334 - name : Run tests
34- run : FOR_TESTSPACE=true bundle exec rake latest
35-
36- - uses : testspace-com/setup-testspace@v1
37- with :
38- domain : ${{ github.repository_owner }}
39- - name : Push result to TestSpace server
40- run : |
41- testspace coverage/coverage.xml
42- if : always()
35+ run : bundle exec rake latest
4336
37+ - name : Assert 100% Test Coverage
38+ run : >
39+ ruby -e "require('json') &&
40+ (rate = JSON.parse(File.read('coverage/.last_run.json'))['result']['line'].to_i) &&
41+ (rate == 100 ? exit(0) : exit(rate))"
0 commit comments