diff options
| -rw-r--r-- | .codecov.yml | 24 | ||||
| -rw-r--r-- | .gitlab-ci.yml | 6 | ||||
| -rw-r--r-- | CLI/ruby/.gitlab-ci.yml | 7 | ||||
| -rw-r--r-- | CLI/ruby/CHANGELOG.md | 1 | ||||
| -rw-r--r-- | CLI/ruby/spec/spec_helper.rb | 5 | ||||
| -rw-r--r-- | README.md | 1 |
6 files changed, 34 insertions, 10 deletions
diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 0000000..0854495 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,24 @@ +codecov: + require_ci_to_pass: yes + +coverage: + status: + project: + only_pulls: false + default: + target: 90% + ruby: + target: 95% + flags: + - ruby + +comment: + layout: "reach,diff,flags,files,footer" + behavior: default + require_changes: no + +flags: + ruby: + paths: + - CLI/ruby/ + carryforward: true diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4926962..28e0986 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,6 @@ ruby: trigger: include: CLI/ruby/.gitlab-ci.yml strategy: depend - only: - changes: - - CLI/ruby/* + rules: + - changes: + - CLI/ruby/**/* diff --git a/CLI/ruby/.gitlab-ci.yml b/CLI/ruby/.gitlab-ci.yml index d573ce5..6fdf07e 100644 --- a/CLI/ruby/.gitlab-ci.yml +++ b/CLI/ruby/.gitlab-ci.yml @@ -1,9 +1,4 @@ image: ruby:2.7 -stages: - - build - - test - - lint - - release variables: BUNDLE_PATH: .bundle/vendor @@ -58,7 +53,7 @@ lint: - bundle exec rubocop release: - stage: release + stage: deploy needs: ["test:2.7", "test:2.6", "test:2.5", lint] rules: - if: $CI_COMMIT_TAG =~ /^ruby\/v.*$/ diff --git a/CLI/ruby/CHANGELOG.md b/CLI/ruby/CHANGELOG.md index 48aad2a..3f6f77d 100644 --- a/CLI/ruby/CHANGELOG.md +++ b/CLI/ruby/CHANGELOG.md @@ -6,6 +6,7 @@ - Fix `game-of-life --delay -10` error with kernel sleep - Fix `game-of-life --width -10` error with generated universe width - Fix `game-of-life --height -10` error with generated universe height +- Add coverage report ## 1.0.0 - Add ruby testing matrix for versions 2.5, 2.6 and 2.7 diff --git a/CLI/ruby/spec/spec_helper.rb b/CLI/ruby/spec/spec_helper.rb index 0c453de..e7feb44 100644 --- a/CLI/ruby/spec/spec_helper.rb +++ b/CLI/ruby/spec/spec_helper.rb @@ -1,7 +1,10 @@ # frozen_string_literal: true require "simplecov" -SimpleCov.start +SimpleCov.start do + add_filter "/spec/" + enable_coverage :branch +end require "codecov" SimpleCov.formatter = SimpleCov::Formatter::Codecov if ENV["CODECOV_TOKEN"] @@ -5,5 +5,6 @@ in the following languages [](https://gitlab.com/a14m/game-of-life/-/commits/master) [](https://gitlab.com/a14m/game-of-life/-/blob/master/LICENSE.md) +[](https://codecov.io/gl/a14m/game-of-life) - [Ruby](./CLI/ruby) [](https://badge.fury.io/rb/terminal_game_of_life) |
