Skip to content

Commit

Permalink
Removes support for reporting to Blinka
Browse files Browse the repository at this point in the history
- Instead use Github Actions artifacts
  • Loading branch information
davidwessman committed Feb 26, 2023
1 parent cab9398 commit d1879ba
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 321 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["2.6", "2.7", "3.0", "3.1"]
ruby: ["2.7", "3.0", "3.1", "3.2"]

steps:
- name: Checkout code
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Removes support for reporting to Blinka, removing the need for httparty.

## [0.7.2] - 2023-02-19

- Adds support for `BLINKA_APPEND=true` to append to existing JSON-files.
Expand Down
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ gem install blinka-reporter
or add to your Gemfile

```ruby
gem 'blinka-reporter', '~> 0.7.0'
gem 'blinka-reporter', '~> 0.7.2'
```

## Which ruby testing frameworks are supported?
Expand Down Expand Up @@ -48,11 +48,6 @@ Make sure [rspec_junit_formatter](https://github.com/sj26/rspec_junit_formatter)
bundle exec rspec --formatter RspecJunitFormatter --out ./rspec.xml
```

## How to send report to Blinka?

1. Output your test results as described [above](#how-to-generate-test-report-in-the-right-format).
1. `bundle exec blinka_reporter --path {./blinka_results.json,./rspec.xml} --blinka --team-id <BLINKA_TEAM_ID> --team-secret <BLINKA_TEAM_SECRET> --repository davidwessman/blinka_reporter`

## How can I send report in Github Action?

Add a step to your Github Action Workflow after running tests:
Expand Down
2 changes: 0 additions & 2 deletions blinka_reporter.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ Gem::Specification.new do |gem|
gem.executables = ["blinka_reporter"]
gem.require_path = ["lib"]

gem.add_dependency("httparty", "~> 0.18")
gem.add_dependency("ox", "~> 2")
gem.add_development_dependency("dotenv", "~> 2.8.0")
gem.add_development_dependency("minitest", "~> 5.0")
gem.add_development_dependency("mocha", "~> 2.0")
gem.add_development_dependency("rake", "~> 13")
gem.add_development_dependency("webmock", "~> 3.11")
gem.add_development_dependency("syntax_tree", "~> 6.0")
end
177 changes: 0 additions & 177 deletions lib/blinka_reporter/blinka.rb

This file was deleted.

31 changes: 1 addition & 30 deletions lib/blinka_reporter/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,6 @@ def self.run(argv)
- ./rspec.xml from https://github.com/sj26/rspec_junit_formatter
--tap: Flag for outputting test results in TAP-protocol, helpful on Heroku CI
--blinka: Flag for reporting test results to blinka.app, requires also supplying:
- --team-id
- --team-secret
- --repository
- --commit
--team-id <team-id>: Blinka team id, only used with --blinka
--team-secret <team-secret>: Blinka team secret, only used with --blinka
--commit <commit>: The commit hash to report
--tag <tag>: The tag for the run, for example to separate a test matrix
--repository <repository>: The Github repository
--host <host>: Override Blink host to send report
EOS
return 0
end
Expand All @@ -34,26 +22,9 @@ def self.run(argv)

paths = argv_value_for(argv, "--path")

blinka = (argv.index("--blinka") || -1) >= 0
commit = argv_value_for(argv, "--commit")&.first
repository = argv_value_for(argv, "--repository")&.first
tag = argv_value_for(argv, "--tag")&.first
team_id = argv_value_for(argv, "--team-id")&.first
team_secret = argv_value_for(argv, "--team-secret")&.first
host = argv_value_for(argv, "--host")&.first

client = BlinkaReporter::Client.new
data = client.parse(paths: paths)
config =
BlinkaReporter::Config.new(
tag: tag,
commit: commit,
team_id: team_id,
team_secret: team_secret,
repository: repository,
host: host
)
client.report(data: data, config: config, tap: tap, blinka: blinka)
client.report(data: data, tap: tap)
end

def self.argv_value_for(argv, option_name)
Expand Down
7 changes: 2 additions & 5 deletions lib/blinka_reporter/client.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
require "httparty"
require "ox"
require "json"

require "blinka_reporter/blinka"
require "blinka_reporter/config"
require "blinka_reporter/error"
require "blinka_reporter/tap"

Expand Down Expand Up @@ -36,9 +34,8 @@ def parse(paths: nil)
)
end

def report(data:, blinka: false, tap: false, config: nil)
def report(data:, tap: false)
BlinkaReporter::Tap.report(data) if tap
BlinkaReporter::Blinka.report(config: config, data: data) if blinka
0
end

Expand Down
37 changes: 0 additions & 37 deletions lib/blinka_reporter/config.rb

This file was deleted.

Loading

0 comments on commit d1879ba

Please sign in to comment.