File tree Expand file tree Collapse file tree 4 files changed +37
-14
lines changed
actions/upload-test-coverage Expand file tree Collapse file tree 4 files changed +37
-14
lines changed Original file line number Diff line number Diff line change 1+ name : " Upload test coverage file"
2+ description : " Upload test coverage file to the desired location"
3+ outputs :
4+ coverage-value :
5+ description : " coverage value"
6+ value : ${{ steps.coverage-value-getter.outputs.coverage-value }}
7+ runs :
8+ using : " composite"
9+ steps :
10+ - name : " Archive code coverage results"
11+ uses : actions/upload-artifact@v3
12+ with :
13+ name : code-coverage-report
14+ path : coverage
15+
16+ - name : " Get coverage value"
17+ id : coverage-value-getter
18+ run : |
19+ coverage_value=`cat ./coverage/.last_run.json | jq -r .result.line`
20+ echo "coverage-value=$coverage_value" >> "$GITHUB_OUTPUT"
21+ shell : bash
Original file line number Diff line number Diff line change 1313 fail-fast : false
1414 matrix :
1515 os : [ubuntu, macos]
16- ruby : [2.6, 2. 7]
16+ ruby : [2.7]
1717 runs-on : ${{ matrix.os }}-latest
1818 steps :
1919 - uses : actions/checkout@v2
@@ -30,12 +30,13 @@ jobs:
3030 run : bundle exec rubocop
3131 - name : Run RSpec
3232 run : bundle exec rspec
33- # https://docs.github.com/ja/actions/configuring-and-managing-workflows/persisting-workflow-data-using-artifacts
34- - name : Archive code coverage results
35- uses : actions/upload-artifact@v2
36- with :
37- name : code-coverage-report
38- path : coverage
33+ - name : Upload test coverage
34+ id : upload-test-coverage
35+ uses : ./.github/actions/upload-test-coverage
36+ - name : Display test coverage in summary
37+ run : |
38+ coverage_value=${{ steps.upload-test-coverage.outputs.coverage-value }}
39+ echo "# Coverage report: $coverage_value%" >> $GITHUB_STEP_SUMMARY
3940 # https://github.com/marketplace/actions/action-slack
4041 - name : Github Actions notify to Slack
4142 uses : 8398a7/action-slack@v3
Original file line number Diff line number Diff line change 1+ ruby 2.7.5
Original file line number Diff line number Diff line change 77 awesome_print (1.9.2 )
88 byebug (11.1.3 )
99 coderay (1.1.3 )
10- connection_pool (2.3 .0 )
10+ connection_pool (2.4 .0 )
1111 diff-lcs (1.5.0 )
1212 docile (1.4.0 )
1313 domain_name (0.5.20190701 )
2929 method_source (0.9.2 )
3030 mime-types (3.4.1 )
3131 mime-types-data (~> 3.2015 )
32- mime-types-data (3.2022.0105 )
33- mini_portile2 (2.8.0 )
32+ mime-types-data (3.2023.0218.1 )
33+ mini_portile2 (2.8.1 )
3434 net-http-digest_auth (1.4.1 )
3535 net-http-persistent (4.0.1 )
3636 connection_pool (~> 2.2 )
37- nokogiri (1.13.8 )
37+ nokogiri (1.14.2 )
3838 mini_portile2 (~> 2.8.0 )
3939 racc (~> 1.4 )
4040 parallel (1.22.1 )
4949 pry-doc (1.3.0 )
5050 pry (~> 0.11 )
5151 yard (~> 0.9.11 )
52- public_suffix (5.0.0 )
53- qiita_trend (0.5.2 )
52+ public_suffix (5.0.1 )
53+ qiita_trend (0.5.4 )
5454 mechanize (~> 2.7 )
5555 nokogiri (~> 1.11 )
56- racc (1.6.0 )
56+ racc (1.6.2 )
5757 rainbow (3.1.1 )
5858 regexp_parser (2.6.0 )
5959 rexml (3.2.5 )
You can’t perform that action at this time.
0 commit comments