From 442d192f0b0f74ddc8f89e2bd88075486de93d12 Mon Sep 17 00:00:00 2001 From: Rob Dingwell Date: Wed, 15 Feb 2017 13:08:52 -0500 Subject: [PATCH] updating jenkins build file to ensure that the schema is loaded before erd test is run. Updated cucumber settings to create both html and console output in a single run as opposed to the 2 that were in place before. Left cucumber out of the default tests for now, will need to be run separatly on dev machines until all of the tests are addressed. Jenkins file has been updated to run the cucumber test as a separate call. --- Jenkinsfile | 3 ++- Rakefile | 1 + config/cucumber.yml | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f1a54b05..f7b83514 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -38,8 +38,9 @@ node('ruby') { } stage('Run Tests') { - withEnv(['OPENSHIFT_POSTGRESQL_DB_NAME=${tdbname}', 'OPENSHIFT_POSTGRESQL_DB_USERNAME=railstest', 'OPENSHIFT_POSTGRESQL_DB_PASSWORD=railstest', 'OPENSHIFT_POSTGRESQL_DB_HOST=${dbhost}', 'OPENSHIFT_POSTGRESQL_DB_PORT=5432']) { + withEnv(['NO_PROXY=localhost,127.0.0.1', 'OPENSHIFT_POSTGRESQL_DB_NAME=${tdbname}', 'OPENSHIFT_POSTGRESQL_DB_USERNAME=railstest', 'OPENSHIFT_POSTGRESQL_DB_PASSWORD=railstest', 'OPENSHIFT_POSTGRESQL_DB_HOST=${dbhost}', 'OPENSHIFT_POSTGRESQL_DB_PORT=5432']) { sh 'bundle exec rake' + sh 'bundle exec cucumber' } } diff --git a/Rakefile b/Rakefile index 26d2c2f5..bdddb16c 100644 --- a/Rakefile +++ b/Rakefile @@ -6,6 +6,7 @@ require 'rubocop/rake_task' Rails.application.load_tasks RuboCop::RakeTask.new + task default: [:create_reports_dir, :rubocop, 'brakeman:run', 'bundle_audit:run', 'javascript:test', 'javascript:lint', 'erd:test'] diff --git a/config/cucumber.yml b/config/cucumber.yml index 3ef52602..748b4037 100644 --- a/config/cucumber.yml +++ b/config/cucumber.yml @@ -2,9 +2,9 @@ rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : "" rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}" std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip" -html_opts = "--format html --out reports/cucumber.html --strict --tags ~@wip" +html_opts = "--format html --out reports/cucumber.html " %> -default: <%= std_opts %> features +default: features --format pretty --format html --out reports/cucumber.html --strict --tags ~@wip html_report: <%= html_opts %> features wip: --tags @wip:3 --wip features rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip