-
Notifications
You must be signed in to change notification settings - Fork 0
test: first working test run #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ff2feb0
test: first working test run
bougyman c8e38cd
fix: adds missing semantic_logger dependency
bougyman be86d0a
chore: removes boilerplate workflow
bougyman 25de707
chore: adds required dependencies
bougyman f347901
test: renames kalshi test to match test spec
bougyman d2ef3e9
ci: adds release please configuration
bougyman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,3 +6,4 @@ | |
| /pkg/ | ||
| /spec/reports/ | ||
| /tmp/ | ||
| *.swp | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| { | ||
| "packages": { | ||
| ".": { | ||
| "changelog-path": "CHANGELOG.md", | ||
| "release-type": "simple", | ||
| "bump-minor-pre-major": true, | ||
| "bump-patch-for-minor-pre-major": true, | ||
| "draft": false, | ||
| "prerelease": false, | ||
| "version-file": ".version.txt", | ||
| "extra-files": [ | ||
| { | ||
| "type": "generic", | ||
| "path": "lib/kalshi/version.rb" | ||
| } | ||
| ], | ||
| "exclude-paths": [ | ||
| ".release-please-manifest.json", | ||
| ".version.txt", | ||
| "lib/kalshi/version.rb", | ||
| ".rubocop.yml", | ||
| ".overcommit.yml", | ||
| "coverage/coverage.json" | ||
| ] | ||
| } | ||
| }, | ||
| "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| ".": "0.0.1" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,16 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| require 'bundler/gem_tasks' | ||
| require 'minitest/test_task' | ||
| require 'rake/testtask' | ||
|
|
||
| Minitest::TestTask.create | ||
| Rake::TestTask.new do |t| | ||
| t.libs << 'test' | ||
| t.test_files = FileList['test/**/*_test.rb'] | ||
| t.ruby_opts = %w[-rhelper] | ||
| end | ||
|
|
||
| require 'rubocop/rake_task' | ||
|
|
||
| RuboCop::RakeTask.new | ||
|
|
||
| task default: %i[test rubocop] | ||
| task default: %i[rubocop test] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| if ENV['COVERAGE'] | ||
| require 'simplecov' | ||
| require 'simplecov-json' | ||
| SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new( | ||
| [ | ||
| SimpleCov::Formatter::HTMLFormatter, | ||
| SimpleCov::Formatter::JSONFormatter | ||
| ] | ||
| ) | ||
| SimpleCov.start do | ||
| enable_coverage :branch | ||
| add_filter '/test/' | ||
| add_filter '/vendor/' | ||
| end | ||
| end | ||
|
|
||
| require_relative '../lib/kalshi' | ||
|
|
||
| require 'minitest/autorun' | ||
| require 'minitest/spec' | ||
| require 'shoulda/context' | ||
| require 'webmock/minitest' | ||
| require 'httpx' | ||
| require 'httpx/adapters/webmock' | ||
| WebMock::HttpLibAdapters::HttpxAdapter.enable! | ||
|
|
||
| WebMock.disable_net_connect!(allow_localhost: true) | ||
|
|
||
| module Minitest | ||
| # Base class for all tests | ||
| class Spec | ||
| before do | ||
| Rubyists::Kalshi.configure do |config| | ||
| config.api_key = 'test_api_key' | ||
| end | ||
| end | ||
| end | ||
| end |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| require 'helper' | ||
|
|
||
| module Rubyists | ||
| # Tests for Kalshi module | ||
| class KalshiTest < Minitest::Spec | ||
| describe 'Kalshi' do | ||
| subject { ::Rubyists::Kalshi } | ||
|
|
||
| it 'has a version number' do | ||
| refute_nil subject::VERSION | ||
| end | ||
|
|
||
| describe 'VERSION' do | ||
| subject { ::Rubyists::Kalshi::VERSION } | ||
|
|
||
| it 'is a valid semantic version' do | ||
| semver_regex = /\A\d+\.\d+\.\d+(-[0-9A-Za-z\-.]+)?(\+[0-9A-Za-z\-.]+)?\z/ | ||
|
|
||
| assert_match(semver_regex, subject) | ||
| end | ||
| end | ||
| end | ||
| end | ||
| end |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.