From 136476a2d02ce790621a978fe18e34582a9064d1 Mon Sep 17 00:00:00 2001 From: dodonki1223 Date: Sat, 25 Mar 2023 18:38:01 +0900 Subject: [PATCH 1/3] =?UTF-8?q?:wrench:=20qiita=5Ftrend=20=E3=81=AE?= =?UTF-8?q?=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E3=82=920.5.4?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6e9de2a..801e800 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -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) @@ -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) From b6d460dd5f73f54152b7849c70e58e6cd8fa3cc9 Mon Sep 17 00:00:00 2001 From: dodonki1223 Date: Sat, 25 Mar 2023 18:41:11 +0900 Subject: [PATCH 2/3] =?UTF-8?q?:wrench:=20=E3=82=AB=E3=83=90=E3=83=AC?= =?UTF-8?q?=E3=83=83=E3=82=B8=E3=83=AC=E3=83=9D=E3=83=BC=E3=83=88=E3=81=AE?= =?UTF-8?q?=E7=B5=90=E6=9E=9C=E3=82=92CI=E7=B5=90=E6=9E=9C=E3=81=AB?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=95=E3=81=9B=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/upload-test-coverage/action.yml | 21 +++++++++++++++++++ .github/workflows/ci.yml | 13 ++++++------ 2 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 .github/actions/upload-test-coverage/action.yml diff --git a/.github/actions/upload-test-coverage/action.yml b/.github/actions/upload-test-coverage/action.yml new file mode 100644 index 0000000..3b41696 --- /dev/null +++ b/.github/actions/upload-test-coverage/action.yml @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e6abda..5199bed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 From bfbc6b497d4a3aff34b7fb84be69c61ea1f075cc Mon Sep 17 00:00:00 2001 From: dodonki1223 Date: Sat, 25 Mar 2023 18:43:47 +0900 Subject: [PATCH 3/3] =?UTF-8?q?:wrench:=20Ruby=20=E3=81=AE=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E3=82=92=202.75=20?= =?UTF-8?q?=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 2 +- .tool-versions | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .tool-versions diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5199bed..668c378 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..a4023dc --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +ruby 2.7.5