diff --git a/.github/workflows/test_danger.yaml b/.github/workflows/test_danger.yaml index c1042763d..191fba70f 100644 --- a/.github/workflows/test_danger.yaml +++ b/.github/workflows/test_danger.yaml @@ -3,6 +3,8 @@ on: push: branches: - master + pull_request: + jobs: danger: name: Post Test results @@ -31,6 +33,6 @@ jobs: bundle install --jobs 4 --retry 3 - name: Run danger env: - GITHUB_TOKEN: test #${{ secrets.PERX_API_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.TOKEN }} run: | bundle exec danger \ No newline at end of file diff --git a/Dangerfile b/Dangerfile index cc3df57c5..749505142 100644 --- a/Dangerfile +++ b/Dangerfile @@ -3,8 +3,18 @@ result_files = Dir.glob("rspec-junit/rspec-*") junit.parse_files result_files junit.show_skipped_tests = true # junit.headers = %i(file name message) -junit.report -all_test = junit.tests.map(&:attributes) -slowest_test = sort_by { |attributes| attributes[:time].to_f }.last -message "#{slowest_test[:time]} took #{slowest_test[:time]} seconds" -puts junit.failures \ No newline at end of file +# junit.report +# all_test = junit.tests.map(&:attributes) +# slowest_test = all_test.sort_by { |attributes| attributes[:time].to_f }.last +# message "#{slowest_test[:name]} took #{slowest_test[:time]} seconds" + +message junit.failures.to_s + +junit.failures.each do |failure| + message failure.to_s + # failure.map(&:attributes) + # fail("") + node = failure.nodes.first + fail(node.to_s) +end + diff --git a/rspec-junit/rspec-4.xml b/rspec-junit/rspec-4.xml index 270c7ec3f..14b5e4272 100644 --- a/rspec-junit/rspec-4.xml +++ b/rspec-junit/rspec-4.xml @@ -722,6 +722,25 @@ Failure/Error: @app.call(env) +ActionController::RoutingError: + No route matches [GET] "/og" +/usr/local/bundle/gems/lograge-0.11.2/lib/lograge/rails_ext/rack/logger.rb:15:in `call_app' +/usr/local/bundle/gems/railties-6.0.2.1/lib/rails/rack/logger.rb:26:in `block in call' +/usr/local/bundle/gems/railties-6.0.2.1/lib/rails/rack/logger.rb:26:in `call' +/usr/local/bundle/gems/request_store-1.5.0/lib/request_store/middleware.rb:19:in `call' +/usr/local/bundle/gems/rack-2.2.2/lib/rack/runtime.rb:22:in `call' +./app/middleware/invalid_params_interceptor.rb:20:in `call' +/usr/local/bundle/gems/rack-2.2.2/lib/rack/sendfile.rb:110:in `call' +/usr/local/bundle/gems/rack-cors-1.0.6/lib/rack/cors.rb:98:in `call' +/usr/local/bundle/gems/invalid_utf8_rejector-0.0.4/lib/invalid_utf8_rejector/middleware.rb:11:in `call' +/usr/local/bundle/gems/sentry-raven-2.13.0/lib/raven/integrations/rack.rb:51:in `call' +/usr/local/bundle/gems/railties-6.0.2.1/lib/rails/engine.rb:526:in `call' +/usr/local/bundle/gems/rack-test-1.1.0/lib/rack/mock_session.rb:29:in `request' +/usr/local/bundle/gems/rack-test-1.1.0/lib/rack/test.rb:266:in `process_request' +/usr/local/bundle/gems/rack-test-1.1.0/lib/rack/test.rb:119:in `request' +./spec/requests/og_spec.rb:10:in `block (2 levels) in <main>' +Failure/Error: @app.call(env) + ActionController::RoutingError: No route matches [GET] "/og" /usr/local/bundle/gems/lograge-0.11.2/lib/lograge/rails_ext/rack/logger.rb:15:in `call_app'