Skip to content

Commit

Permalink
feat: add carryforward option to config (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrexox authored May 22, 2023
1 parent e5e3a81 commit 6333315
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions doc/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,7 @@ service_name: my-ci

# Coveralls endpoint
endpoint: https://coveralls.io

# Carryforward flags (or all to carry-forward all previous jobs)
carryforward: all
```
1 change: 1 addition & 0 deletions src/coverage_reporter/config.cr
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ module CoverageReporter

delegate :[], to: to_h
delegate :[]?, to: to_h
delegate :carryforward, to: @yaml

def to_h
@options ||=
Expand Down
2 changes: 1 addition & 1 deletion src/coverage_reporter/reporter.cr
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ module CoverageReporter
# from a CI-specific ENV, or can be set explicitly via `COVERALLS_SERVICE_NUMBER`
# environment variable.
def parallel_done
api = Api::Webhook.new(config, carryforward)
api = Api::Webhook.new(config, carryforward || config.carryforward)

api.send_request(dry_run)
end
Expand Down
1 change: 1 addition & 0 deletions src/coverage_reporter/yaml_config.cr
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module CoverageReporter
property repo_secret_token : String?
property repo_name : String?
property endpoint : String?
property carryforward : String?

DEFAULT_LOCATION = ".coveralls.yml"

Expand Down

0 comments on commit 6333315

Please sign in to comment.