Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/actions/upload-test-coverage/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Upload test coverage file"
description: "Upload test coverage file to the desired location"
outputs:
coverage-value:
description: "coverage value"
value: ${{ steps.coverage-value-getter.outputs.coverage-value }}
runs:
using: "composite"
steps:
- name: "Archive code coverage results"
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: coverage

- name: "Get coverage value"
id: coverage-value-getter
run: |
coverage_value=`cat ./coverage/.last_run.json | jq -r .result.line`
echo "coverage-value=$coverage_value" >> "$GITHUB_OUTPUT"
shell: bash
15 changes: 8 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu, macos]
ruby: [2.6, 2.7]
ruby: [2.7]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -30,12 +30,13 @@ jobs:
run: bundle exec rubocop
- name: Run RSpec
run: bundle exec rspec
# https://docs.github.com/ja/actions/configuring-and-managing-workflows/persisting-workflow-data-using-artifacts
- name: Archive code coverage results
uses: actions/upload-artifact@v2
with:
name: code-coverage-report
path: coverage
- name: Upload test coverage
id: upload-test-coverage
uses: ./.github/actions/upload-test-coverage
- name: Display test coverage in summary
run: |
coverage_value=${{ steps.upload-test-coverage.outputs.coverage-value }}
echo "# Coverage report: $coverage_value%" >> $GITHUB_STEP_SUMMARY
# https://github.com/marketplace/actions/action-slack
- name: Github Actions notify to Slack
uses: 8398a7/action-slack@v3
Expand Down
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby 2.7.5
14 changes: 7 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GEM
awesome_print (1.9.2)
byebug (11.1.3)
coderay (1.1.3)
connection_pool (2.3.0)
connection_pool (2.4.0)
diff-lcs (1.5.0)
docile (1.4.0)
domain_name (0.5.20190701)
Expand All @@ -29,12 +29,12 @@ GEM
method_source (0.9.2)
mime-types (3.4.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2022.0105)
mini_portile2 (2.8.0)
mime-types-data (3.2023.0218.1)
mini_portile2 (2.8.1)
net-http-digest_auth (1.4.1)
net-http-persistent (4.0.1)
connection_pool (~> 2.2)
nokogiri (1.13.8)
nokogiri (1.14.2)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
parallel (1.22.1)
Expand All @@ -49,11 +49,11 @@ GEM
pry-doc (1.3.0)
pry (~> 0.11)
yard (~> 0.9.11)
public_suffix (5.0.0)
qiita_trend (0.5.2)
public_suffix (5.0.1)
qiita_trend (0.5.4)
mechanize (~> 2.7)
nokogiri (~> 1.11)
racc (1.6.0)
racc (1.6.2)
rainbow (3.1.1)
regexp_parser (2.6.0)
rexml (3.2.5)
Expand Down