From f76b383c69773a4f63c124fc8dd11335233e7777 Mon Sep 17 00:00:00 2001 From: Konstantin Gredeskoul Date: Mon, 13 Apr 2020 13:59:54 -0700 Subject: [PATCH 1/4] Adding Codecov --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a0365de..4109f97 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,21 @@ cache: bundler rvm: - 2.3.8 -- 2.4.6 +- 2.4.10 - 2.5.3 - 2.6.2 +- 2.7.1 services: - redis-server before_script: - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - chmod +x ./cc-test-reporter - ./cc-test-reporter before-build -script: bundle exec rspec +script: bundle exec rspec --format=documentation after_script: + - bash <(curl -s https://codecov.io/bash) - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT env: global: + CODECOV_TOKEN="2085c087-f833-49c7-a105-703bce882653" secure: cdUlrz0XNCu0HB5lNLYZBF6yaukIkDZRlVsAbeeaNhPKCVj7MOvuGEUZ9TzQP0yXRaGXHy3xXem0MdDbnli5WYvHxj2MTrRVEDBiRm4jaZFHe3Rewr2mWmLqK1c4g9gvOTgjPNPTesdft87+wQuPedQLpfMGuedA86tkKzA2Tkc4J69DI93C02h6H89iiQFHL9ISNk5DzZh3FJo+fyi0JQlD6CAzWrVplCqf088qGdAk3Hy77Q2GKkVEdOb/P0cdmDLnFjekdh4b0TPI/uaqgu4cZeoebWQgg61K/enGLqxY2Lp0f4DsXQev+06d14KxIJMYHLuDgvlVwYMDInxQU7kXgTRgAnaxRdm0S7NbP89uBVkfIQiNGan7Qkvw2ayGhYCcu7Vgvjo6C2btZWLpxT0XvpQGfpvHrRrPnzFbFLLtG4rhJd3iiTbSa5LPDEi4Qx9uwGNy4iR6IB69R6dPwAR8P45XZE4JnJVUvrM/X9v9Yv2hAxnuCb48whalIozGqpwavLdYrgCf2pQecls74uw4mCxvDAg0EoskrDYuk4DYeZ507ajor4zX1avLUVfYk/0igpp6KeLENY5ozl1zsEvRcOldfdV8R9tKEGxliIgffe67Hc5/ZP+C/53lcK0nIxXYrB1I7Q+CVlEDNutNQNZRDfrNBYJVe/+RvmmdD+w= From b89fd8dffd77b1633af8560fda806ac4e330bb3a Mon Sep 17 00:00:00 2001 From: Konstantin Gredeskoul Date: Mon, 13 Apr 2020 14:48:10 -0700 Subject: [PATCH 2/4] Adding redis to GitHub actions --- .github/workflows/ruby.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index aab30d9..612a1d9 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -17,8 +17,14 @@ jobs: uses: actions/setup-ruby@v1 with: ruby-version: 2.7.x + + - name: Start Redis + uses: supercharge/redis-github-action@v1.1.0 + with: + redis-version: 5 + - name: Build and test with Rake run: | gem install bundler bundle install --jobs 4 --retry 3 - bundle exec rspec --format=documentation + bundle exec rspec From 877931d0ef0de65fb67b6135b860b36b9a4bfd9a Mon Sep 17 00:00:00 2001 From: Konstantin Gredeskoul Date: Mon, 13 Apr 2020 14:58:58 -0700 Subject: [PATCH 3/4] Add redis service --- .github/workflows/ruby.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 612a1d9..9b3692b 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -11,6 +11,13 @@ jobs: runs-on: ubuntu-latest + services: + redis: + image: redis + ports: + - 6379:6379 + options: --entrypoint redis-server + steps: - uses: actions/checkout@v2 - name: Set up Ruby 2.7 @@ -18,13 +25,11 @@ jobs: with: ruby-version: 2.7.x - - name: Start Redis - uses: supercharge/redis-github-action@v1.1.0 - with: - redis-version: 5 - - name: Build and test with Rake run: | gem install bundler bundle install --jobs 4 --retry 3 bundle exec rspec + env: + REDIS_HOST: redis + REDIS_PORT: ${{ job.services.redis.ports[6379] }} From 618bd798ec338e156d525c25df09550764abd2da Mon Sep 17 00:00:00 2001 From: Konstantin Gredeskoul Date: Mon, 13 Apr 2020 15:04:03 -0700 Subject: [PATCH 4/4] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e252a62..7e197d1 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![Gem Version](https://img.shields.io/gem/v/simple-feed.svg)](https://rubygems.org/gems/simple-feed) [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/kigster/simple-feed/master/LICENSE.txt) +![Ruby](https://github.com/kigster/simple-feed/workflows/Ruby/badge.svg) [![Build Status](https://travis-ci.org/kigster/simple-feed.svg?branch=master)](https://travis-ci.org/kigster/simple-feed) [![Maintainability](https://api.codeclimate.com/v1/badges/a11061820895fcde635e/maintainability)](https://codeclimate.com/github/kigster/simple-feed/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/a11061820895fcde635e/test_coverage)](https://codeclimate.com/github/kigster/simple-feed/test_coverage)