File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 os : [ubuntu-latest]
1111 ruby-version :
1212 - head
13- - ' 4.0 '
13+ - ruby
1414 - ' 3.4'
1515 - ' 3.3'
1616 - ' 3.2'
5252 bundle install --jobs 3 --retry 3
5353 - name : Run tests
5454 run : bundle exec rake test
55+ - name : Read coverage
56+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.os == 'ubuntu-latest' && matrix.ruby-version == 'ruby' }}
57+ run : |
58+ ruby -rjson -e '
59+ coverage = JSON.parse(File.read("coverage/.last_run.json")).dig("result", "line")
60+ abort "coverage result not found" unless coverage
61+
62+ File.open(ENV.fetch("GITHUB_ENV"), "a") do |env|
63+ env.puts "COVERAGE=#{format("%.2f", coverage)}"
64+ end
65+ '
66+ - name : Update coverage badge
67+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.os == 'ubuntu-latest' && matrix.ruby-version == 'ruby' }}
68+ uses : Schneegans/dynamic-badges-action@v1.8.0
69+ with :
70+ auth : ${{ secrets.GIST_TOKEN }}
71+ gistID : 70532e48ae064176aaded5fbbdbf2ffc
72+ filename : highline-coverage.json
73+ label : coverage
74+ message : ${{ env.COVERAGE }}%
75+ valColorRange : ${{ env.COVERAGE }}
76+ maxColorRange : 100
77+ minColorRange : 0
Original file line number Diff line number Diff line change 33
44[ ![ Tests] ( https://github.com/JEG2/highline/actions/workflows/ci.yml/badge.svg )] ( https://github.com/JEG2/highline/actions/workflows/ci.yml )
55[ ![ Gem Version] ( https://badge.fury.io/rb/highline.svg )] ( https://badge.fury.io/rb/highline )
6- [ ![ Code Climate] ( https://codeclimate.com/github/JEG2/highline/badges/gpa.svg )] ( https://codeclimate.com/github/JEG2/highline )
7- [ ![ Test Coverage] ( https://codeclimate.com/github/JEG2/highline/badges/coverage.svg )] ( https://codeclimate.com/github/JEG2/highline/coverage )
6+ [ ![ Test Coverage] ( https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/abinoam/70532e48ae064176aaded5fbbdbf2ffc/raw/highline-coverage.json )] ( https://github.com/JEG2/highline/actions/workflows/ci.yml )
87[ ![ Inline docs] ( http://inch-ci.org/github/JEG2/highline.svg?branch=master )] ( http://inch-ci.org/github/JEG2/highline )
98
109Description
You can’t perform that action at this time.
0 commit comments