-
Notifications
You must be signed in to change notification settings - Fork 42
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
Setup maze runner #380
Merged
Merged
Setup maze runner #380
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
There are no files selected for viewing
This file contains 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 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,29 @@ | ||
name: Maze Runner | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
maze-runner: | ||
runs-on: 'ubuntu-latest' | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ['3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install libcurl4-openssl-dev and net-tools | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libcurl4-openssl-dev net-tools | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.3' | ||
bundler-cache: true | ||
|
||
- run: bundle exec maze-runner --no-source | ||
env: | ||
PYTHON_TEST_VERSION: ${{ matrix.python-version }} |
This file contains 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,3 +1,6 @@ | ||
maze-runner.log | ||
maze_output | ||
|
||
*.py[co] | ||
|
||
# Packages | ||
|
This file contains 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 @@ | ||
source "https://rubygems.org" | ||
|
||
gem 'bugsnag-maze-runner', '~> 9.6' |
This file contains 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,140 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
appium_lib (12.0.1) | ||
appium_lib_core (~> 5.0) | ||
nokogiri (~> 1.8, >= 1.8.1) | ||
tomlrb (>= 1.1, < 3.0) | ||
appium_lib_core (5.4.0) | ||
faye-websocket (~> 0.11.0) | ||
selenium-webdriver (~> 4.2, < 4.6) | ||
bugsnag (6.26.4) | ||
concurrent-ruby (~> 1.0) | ||
bugsnag-maze-runner (9.6.0) | ||
appium_lib (~> 12.0.0) | ||
appium_lib_core (~> 5.4.0) | ||
bugsnag (~> 6.24) | ||
cucumber (~> 7.1) | ||
cucumber-expressions (~> 6.0.0) | ||
curb (~> 0.9.6) | ||
dogstatsd-ruby (~> 5.5.0) | ||
json_schemer (~> 0.2.24) | ||
optimist (~> 3.0.1) | ||
os (~> 1.0.0) | ||
rack (~> 2.2) | ||
rake (~> 12.3.3) | ||
rubyzip (~> 2.3.2) | ||
selenium-webdriver (~> 4.0) | ||
test-unit (~> 3.5.2) | ||
webrick (~> 1.7.0) | ||
builder (3.2.4) | ||
childprocess (4.1.0) | ||
concurrent-ruby (1.2.3) | ||
cucumber (7.1.0) | ||
builder (~> 3.2, >= 3.2.4) | ||
cucumber-core (~> 10.1, >= 10.1.0) | ||
cucumber-create-meta (~> 6.0, >= 6.0.1) | ||
cucumber-cucumber-expressions (~> 14.0, >= 14.0.0) | ||
cucumber-gherkin (~> 22.0, >= 22.0.0) | ||
cucumber-html-formatter (~> 17.0, >= 17.0.0) | ||
cucumber-messages (~> 17.1, >= 17.1.1) | ||
cucumber-wire (~> 6.2, >= 6.2.0) | ||
diff-lcs (~> 1.4, >= 1.4.4) | ||
mime-types (~> 3.3, >= 3.3.1) | ||
multi_test (~> 0.1, >= 0.1.2) | ||
sys-uname (~> 1.2, >= 1.2.2) | ||
cucumber-core (10.1.1) | ||
cucumber-gherkin (~> 22.0, >= 22.0.0) | ||
cucumber-messages (~> 17.1, >= 17.1.1) | ||
cucumber-tag-expressions (~> 4.1, >= 4.1.0) | ||
cucumber-create-meta (6.0.4) | ||
cucumber-messages (~> 17.1, >= 17.1.1) | ||
sys-uname (~> 1.2, >= 1.2.2) | ||
cucumber-cucumber-expressions (14.0.0) | ||
cucumber-expressions (6.0.1) | ||
cucumber-gherkin (22.0.0) | ||
cucumber-messages (~> 17.1, >= 17.1.1) | ||
cucumber-html-formatter (17.0.0) | ||
cucumber-messages (~> 17.1, >= 17.1.0) | ||
cucumber-messages (17.1.1) | ||
cucumber-tag-expressions (4.1.0) | ||
cucumber-wire (6.2.1) | ||
cucumber-core (~> 10.1, >= 10.1.0) | ||
cucumber-cucumber-expressions (~> 14.0, >= 14.0.0) | ||
curb (0.9.11) | ||
diff-lcs (1.5.1) | ||
dogstatsd-ruby (5.5.0) | ||
ecma-re-validator (0.4.0) | ||
regexp_parser (~> 2.2) | ||
eventmachine (1.2.7) | ||
faye-websocket (0.11.3) | ||
eventmachine (>= 0.12.0) | ||
websocket-driver (>= 0.5.1) | ||
ffi (1.16.3) | ||
hana (1.3.7) | ||
json_schemer (0.2.25) | ||
ecma-re-validator (~> 0.3) | ||
hana (~> 1.3) | ||
regexp_parser (~> 2.0) | ||
simpleidn (~> 0.2) | ||
uri_template (~> 0.7) | ||
mime-types (3.5.2) | ||
mime-types-data (~> 3.2015) | ||
mime-types-data (3.2024.0305) | ||
multi_test (0.1.2) | ||
nokogiri (1.16.3-aarch64-linux) | ||
racc (~> 1.4) | ||
nokogiri (1.16.3-arm-linux) | ||
racc (~> 1.4) | ||
nokogiri (1.16.3-arm64-darwin) | ||
racc (~> 1.4) | ||
nokogiri (1.16.3-x86-linux) | ||
racc (~> 1.4) | ||
nokogiri (1.16.3-x86_64-darwin) | ||
racc (~> 1.4) | ||
nokogiri (1.16.3-x86_64-linux) | ||
racc (~> 1.4) | ||
optimist (3.0.1) | ||
os (1.0.1) | ||
power_assert (2.0.3) | ||
racc (1.7.3) | ||
rack (2.2.9) | ||
rake (12.3.3) | ||
regexp_parser (2.9.0) | ||
rexml (3.2.6) | ||
rubyzip (2.3.2) | ||
selenium-webdriver (4.5.0) | ||
childprocess (>= 0.5, < 5.0) | ||
rexml (~> 3.2, >= 3.2.5) | ||
rubyzip (>= 1.2.2, < 3.0) | ||
websocket (~> 1.0) | ||
simpleidn (0.2.1) | ||
unf (~> 0.1.4) | ||
sys-uname (1.2.3) | ||
ffi (~> 1.1) | ||
test-unit (3.5.9) | ||
power_assert | ||
tomlrb (2.0.3) | ||
unf (0.1.4) | ||
unf_ext | ||
unf_ext (0.0.9.1) | ||
uri_template (0.7.0) | ||
webrick (1.7.0) | ||
websocket (1.2.10) | ||
websocket-driver (0.7.6) | ||
websocket-extensions (>= 0.1.0) | ||
websocket-extensions (0.1.5) | ||
|
||
PLATFORMS | ||
aarch64-linux | ||
arm-linux | ||
arm64-darwin | ||
x86-linux | ||
x86_64-darwin | ||
x86_64-linux | ||
|
||
DEPENDENCIES | ||
bugsnag-maze-runner (~> 9.6) | ||
|
||
BUNDLED WITH | ||
2.5.1 |
This file contains 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 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 @@ | ||
temp-bugsnag-python/ |
This file contains 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,14 @@ | ||
version: "3.8" | ||
|
||
services: | ||
plain: | ||
build: | ||
context: plain | ||
args: | ||
- PYTHON_TEST_VERSION | ||
environment: | ||
- BUGSNAG_API_KEY | ||
- BUGSNAG_ERROR_ENDPOINT | ||
- BUGSNAG_SESSION_ENDPOINT | ||
extra_hosts: | ||
- "host.docker.internal:host-gateway" |
This file contains 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,9 @@ | ||
ARG PYTHON_TEST_VERSION | ||
FROM python:$PYTHON_TEST_VERSION | ||
|
||
COPY app/ /usr/src/app | ||
COPY temp-bugsnag-python/ /usr/src/bugsnag | ||
|
||
WORKDIR /usr/src/app | ||
|
||
RUN pip install --no-cache-dir -r requirements.txt |
This file contains 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,10 @@ | ||
import os | ||
import bugsnag | ||
|
||
bugsnag.configure( | ||
api_key=os.environ["BUGSNAG_API_KEY"], | ||
endpoint=os.environ["BUGSNAG_ERROR_ENDPOINT"], | ||
session_endpoint=os.environ["BUGSNAG_SESSION_ENDPOINT"], | ||
) | ||
|
||
bugsnag.notify(RuntimeError("uh oh :o")) |
This file contains 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 @@ | ||
../bugsnag |
This file contains 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,10 @@ | ||
import os | ||
import bugsnag | ||
|
||
bugsnag.configure( | ||
api_key=os.environ["BUGSNAG_API_KEY"], | ||
endpoint=os.environ["BUGSNAG_ERROR_ENDPOINT"], | ||
session_endpoint=os.environ["BUGSNAG_SESSION_ENDPOINT"], | ||
) | ||
|
||
raise Exception("OH NO!") |
This file contains 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,11 @@ | ||
Feature: Handled exceptions | ||
|
||
Scenario: Handled exceptions are delivered | ||
Given I run the service "plain" with the command "python handled.py" | ||
And I wait to receive an error | ||
Then the error is valid for the error reporting API version "4.0" for the "Python Bugsnag Notifier" notifier | ||
And the exception "errorClass" equals "RuntimeError" | ||
And the exception "message" equals "uh oh :o" | ||
And the event "unhandled" is false | ||
And the event "severity" equals "warning" | ||
And the event "severityReason.type" equals "handledException" |
This file contains 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,11 @@ | ||
Feature: Unhandled exceptions | ||
|
||
Scenario: Unhandled exceptions are delivered | ||
Given I run the service "plain" with the command "python unhandled.py" | ||
And I wait to receive an error | ||
Then the error is valid for the error reporting API version "4.0" for the "Python Bugsnag Notifier" notifier | ||
And the exception "errorClass" equals "Exception" | ||
And the exception "message" equals "OH NO!" | ||
And the event "unhandled" is true | ||
And the event "severity" equals "error" | ||
And the event "severityReason.type" equals "unhandledException" |
This file contains 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,46 @@ | ||
require "fileutils" | ||
|
||
Maze.hooks.before_all do | ||
# log to console, not the filesystem | ||
Maze.config.file_log = false | ||
Maze.config.log_requests = true | ||
|
||
# don't wait so long for requests/not to receive requests | ||
Maze.config.receive_requests_wait = 10 | ||
Maze.config.receive_no_requests_wait = 10 | ||
|
||
# warn if a test takes more than 5 seconds to send a request | ||
Maze.config.receive_requests_slow_threshold = 5 | ||
|
||
# bugsnag-python doesn't need to send the integrity header | ||
Maze.config.enforce_bugsnag_integrity = false | ||
|
||
# install bugsnag into each fixture | ||
Dir.each_child("features/fixtures") do |path| | ||
fixture_directory = "#{Dir.pwd}/features/fixtures/#{path}" | ||
|
||
next unless File.directory?(fixture_directory) | ||
|
||
destination = "#{fixture_directory}/temp-bugsnag-python" | ||
|
||
FileUtils.mkdir(destination) unless File.exist?(destination) | ||
|
||
FileUtils.cp_r( | ||
["bugsnag", "setup.py"], | ||
destination, | ||
remove_destination: true # delete destination before copying | ||
) | ||
|
||
at_exit do | ||
FileUtils.rm_rf(destination) | ||
end | ||
end | ||
end | ||
|
||
Maze.hooks.before do | ||
host = "host.docker.internal" | ||
|
||
Maze::Runner.environment["BUGSNAG_API_KEY"] = $api_key | ||
Maze::Runner.environment["BUGSNAG_ERROR_ENDPOINT"] = "http://#{host}:#{Maze.config.port}/notify" | ||
Maze::Runner.environment["BUGSNAG_SESSION_ENDPOINT"] = "http://#{host}:#{Maze.config.port}/sessions" | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is required for the step: