From 52cacc3489a8a2e7ea32473011774c419f7554c5 Mon Sep 17 00:00:00 2001 From: Victor Nakasone Date: Mon, 18 Oct 2021 15:27:38 -0300 Subject: [PATCH 1/7] Updates CI for heartcheck --- .github/workflows/ci.yml | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0061ef9..f0f1b1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,29 +1,25 @@ -name: ci +name: CI -on: - push: - branches: - - "*" - pull_request: - branches: - - "*" +on: [push, pull_request] jobs: - testgi: - runs-on: ubuntu-latest + test: strategy: + fail-fast: false matrix: - ruby-version: ["2.6", "2.7", "3.0"] + os: [ubuntu-latest] + ruby: ["2.6", "2.7", "3.0"] + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v1 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby-version }} - bundler-cache: true + - uses: actions/checkout@v2 - - name: Run tests - run: | - bundle install --jobs 4 --retry 3 - bundle exec rspec + - name: Set up Ruby and Bundler + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + bundler: 1.17.3 + + - name: Run tests + run: bundle exec rspec From 916c6f8ec867416bdb23c117f2f24a8a925188dc Mon Sep 17 00:00:00 2001 From: Victor Nakasone Date: Mon, 18 Oct 2021 15:59:24 -0300 Subject: [PATCH 2/7] Adds linter and fix duplicated bundle install --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0f1b1a..b4e5be0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,9 @@ jobs: with: ruby-version: ${{ matrix.ruby }} bundler-cache: true - bundler: 1.17.3 - name: Run tests run: bundle exec rspec + + - name: Run linter + run: bundle exec rubocop From 1ef3ac0a04f400362f158f9f7205a654dac0fa91 Mon Sep 17 00:00:00 2001 From: Victor Nakasone Date: Mon, 18 Oct 2021 15:59:57 -0300 Subject: [PATCH 3/7] Ignore .gems folder as it's not necessary for heartcheck gem --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8e048f4..07d25c8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.gems/ *.gem *.rbc .bundle From fcb42978d9c61276512d374ddf4dbd0dcddd8e94 Mon Sep 17 00:00:00 2001 From: Victor Nakasone Date: Mon, 18 Oct 2021 16:00:55 -0300 Subject: [PATCH 4/7] Fix badge to point to github actions ci --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 52b2d6c..65441db 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ declare service checks and an URI that returns the status for each service. With this gem you can monitor if your app has access to the database, a cache service, an API, etc. -[![Build Status](https://travis-ci.org/locaweb/heartcheck.svg)](https://travis-ci.org/locaweb/heartcheck) +[![Build Status](https://github.com/locaweb/heartcheck/actions/workflows/ci.yml/badge.svg)](https://github.com/locaweb/heartcheck/actions/workflows/ci.yml) [![Code Climate](https://codeclimate.com/github/locaweb/heartcheck/badges/gpa.svg)](https://codeclimate.com/github/locaweb/heartcheck) [![Ebert](https://ebertapp.io/github/locaweb/heartcheck.svg)](https://ebertapp.io/github/locaweb/heartcheck) From 27c32b5a1ee8d1da9504709831c9000f4e81f061 Mon Sep 17 00:00:00 2001 From: Victor Nakasone Date: Mon, 18 Oct 2021 16:01:42 -0300 Subject: [PATCH 5/7] Removed frozen string due necessary modification in string --- lib/heartcheck/checks/firewall.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/heartcheck/checks/firewall.rb b/lib/heartcheck/checks/firewall.rb index 31f5613..1ecca70 100644 --- a/lib/heartcheck/checks/firewall.rb +++ b/lib/heartcheck/checks/firewall.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: true +# frozen_string_literal: false module Heartcheck module Checks From 8329c08aa4dd1e45403c69539659bb5f16388792 Mon Sep 17 00:00:00 2001 From: Victor Nakasone Date: Mon, 18 Oct 2021 16:03:16 -0300 Subject: [PATCH 6/7] Removes changelog information, as we're not going to bump minor version --- CHANGELOG | 3 --- 1 file changed, 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 77f2c15..778bc6d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,8 +1,5 @@ = Heart Check - Changelog -== Version 2.4.0 :: 2021-10-01 - * Add docker to facilitate development - == Version 2.3.1 :: 2021-06-14 * Move and rename GitHub template files to correct folder From 8ff44e220c1c97a4f69841e3ff2d8f52fd403c96 Mon Sep 17 00:00:00 2001 From: Victor Nakasone Date: Mon, 18 Oct 2021 16:05:35 -0300 Subject: [PATCH 7/7] Improve CI step description --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b4e5be0..1d59d19 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Ruby and Bundler + - name: Set up Ruby, bundler and dependencies uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }}