Skip to content

Commit

Permalink
Merge pull request openshift#6396 from spadgett/jest-junit
Browse files Browse the repository at this point in the history
Bug 1871176: add a JUnit report for jest when running in CI
  • Loading branch information
openshift-merge-robot authored Aug 22, 2020
2 parents d078c24 + f827019 commit d4572a8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@
"jasmine-reporters": "2.x",
"jest": "21.x",
"jest-cli": "21.x",
"jest-junit": "^11.1.0",
"jest-transform-graphql": "^2.1.0",
"lint-staged": "^10.2.2",
"mini-css-extract-plugin": "0.4.x",
Expand Down
16 changes: 13 additions & 3 deletions frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10116,6 +10116,16 @@ jest-jquery-matchers@^2.1.0:
resolved "https://registry.yarnpkg.com/jest-jquery-matchers/-/jest-jquery-matchers-2.1.0.tgz#b56d19c460f6e57b17e6ddcce6f905d28b0ec532"
integrity sha512-gbCptZOPFv4m7CJenRJcp7OTmQ432yakCDGup6gExrIwbNq8hBfxU+llXO2IXOpFuLmI0c8A+JdGMUNXe6LV9A==

jest-junit@^11.1.0:
version "11.1.0"
resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-11.1.0.tgz#79cd53948e44d62b2b30fa23ea0d7a899d2c8d7a"
integrity sha512-c2LFOyKY7+ZxL5zSu+WHmHfsJ2wqbOpeYJ4Uu26yMhFxny2J2NQj6AVS7M+Eaxji9Q/oIDDK5tQy0DGzDp9xOw==
dependencies:
mkdirp "^1.0.4"
strip-ansi "^5.2.0"
uuid "^3.3.3"
xml "^1.0.1"

jest-matcher-utils@^21.2.1:
version "21.2.1"
resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-21.2.1.tgz#72c826eaba41a093ac2b4565f865eb8475de0f64"
Expand Down Expand Up @@ -11539,7 +11549,7 @@ [email protected], "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1:
dependencies:
minimist "0.0.8"

[email protected]:
[email protected], mkdirp@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
Expand Down Expand Up @@ -16850,7 +16860,7 @@ uuid@^3.1.0, uuid@^3.3.2:
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==

uuid@^3.4.0:
uuid@^3.3.3, uuid@^3.4.0:
version "3.4.0"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
Expand Down Expand Up @@ -17892,7 +17902,7 @@ xml2js@^0.4.17:
sax ">=0.6.0"
xmlbuilder "~9.0.1"

xml@^1.0.0:
xml@^1.0.0, xml@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5"
integrity sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=
Expand Down
10 changes: 9 additions & 1 deletion test-frontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@

set -euo pipefail

# https://ci-operator-configresolver-ui-ci.apps.ci.l2s4.p1.openshiftapps.com/help#env
OPENSHIFT_CI=${OPENSHIFT_CI:=false}
ARTIFACT_DIR=${ARTIFACT_DIR:=/tmp/artifacts}

cd frontend
yarn run lint
yarn run test
if [ "$OPENSHIFT_CI" = true ]; then
JEST_SUITE_NAME="OpenShift Console Unit Tests" JEST_JUNIT_OUTPUT_DIR="$ARTIFACT_DIR" yarn run test --ci --reporters=default --reporters=jest-junit
else
yarn run test
fi

if git status --short | grep 'yarn.lock' > /dev/null; then
printf "\n\nOUTDATED yarn.lock (COMMIT IT TO FIX!!!!!)\n"
Expand Down

0 comments on commit d4572a8

Please sign in to comment.