modify test setup

- jenkinsfile: fix so that junit artifacting happens at Test time, regardless of state.
- mix.exs: add junit_formatter to dependacies.
- config/test.exs: add initial configuration for junit_formatter
devel
Rachel Fae Fox (foxiepaws) 2019-07-19 02:56:38 -04:00
parent 9bff1e791d
commit 0d7555f22d
3 changed files with 15 additions and 16 deletions

22
Jenkinsfile vendored
View File

@ -20,23 +20,15 @@ mix ecto.migrate'''
}
stage('Test') {
steps {
sh '''mix test --cover
'''
sh 'mix test --cover'
junit '_build/*.xml'
}
}
stage('Pre-Deploy') {
parallel {
stage('Webpack') {
stage('Webpack') {
steps {
sh 'mix phx.digest'
}
}
stage('JUnit') {
steps {
junit 'reports/*.xml'
}
}
}
}
}
}
}
}
}

View File

@ -14,5 +14,11 @@ config :gravure, GravureWeb.Endpoint,
http: [port: 4002],
server: false
config :junit_formatter,
report_file: "junit.xml",
report_dir: "_build/",
print_report_file: true,
prepend_project_name?: true
# Print only warnings and errors during test
config :logger, level: :warn

View File

@ -42,7 +42,8 @@ defmodule Gravure.MixProject do
{:phoenix_live_reload, "~> 1.2", only: :dev},
{:gettext, "~> 0.11"},
{:jason, "~> 1.0"},
{:plug_cowboy, "~> 2.0"}
{:plug_cowboy, "~> 2.0"},
{:junit_formatter, "~> 3.0", only: [:test]}
]
end