From 856cb1d80f81ed683b7990aaf8ab0e89433df0f1 Mon Sep 17 00:00:00 2001 From: Maria Alexandra <239999+axelavargas@users.noreply.github.com> Date: Tue, 24 Aug 2021 13:44:52 +0200 Subject: [PATCH] Pipeline: Fix pa11y ci when server is not available and fix publish frontend metrics step (#38485) --- .drone.yml | 5 +++-- package.json | 3 ++- scripts/lib.star | 3 ++- yarn.lock | 55 ++++++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 60 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index e8d9c532ccb..adba665a8bf 100644 --- a/.drone.yml +++ b/.drone.yml @@ -440,7 +440,8 @@ steps: - name: test-a11y-frontend image: buildkite/puppeteer commands: - - yarn -s test:accessibility --json > pa11y-ci-results.json 1>&2 + - yarn wait-on http://$HOST:$PORT + - yarn -s test:accessibility --json > pa11y-ci-results.json environment: GRAFANA_MISC_STATS_API_KEY: from_secret: grafana_misc_stats_api_key @@ -3576,6 +3577,6 @@ get: --- kind: signature -hmac: fc2618815f2265330f70494b9b57bce4e4e45a4301726778f7698ec7fe97504f +hmac: 9059b8ad45f49ce540c8af4261abac6026995fe6437fb8d85395e4994ed72d1b ... diff --git a/package.json b/package.json index 569637bdc90..a6a173909c8 100644 --- a/package.json +++ b/package.json @@ -185,11 +185,11 @@ "ngtemplate-loader": "2.0.1", "nodemon": "2.0.2", "optimize-css-assets-webpack-plugin": "5.0.5", + "pa11y-ci": "2.4.2", "postcss-browser-reporter": "0.6.0", "postcss-loader": "3.0.0", "postcss-reporter": "6.0.1", "prettier": "2.2.1", - "pa11y-ci": "2.4.2", "raw-loader": "4.0.2", "react-hot-loader": "4.8.0", "react-select-event": "^5.1.0", @@ -209,6 +209,7 @@ "ts-node": "9.0.0", "tslib": "2.2.0", "typescript": "4.3.4", + "wait-on": "6.0.0", "webpack": "4.41.5", "webpack-bundle-analyzer": "3.6.0", "webpack-cleanup-plugin": "0.5.1", diff --git a/scripts/lib.star b/scripts/lib.star index 216a1022553..0f22e7feb85 100644 --- a/scripts/lib.star +++ b/scripts/lib.star @@ -495,7 +495,8 @@ def test_a11y_frontend_step(edition, port=3001): }, 'failure': 'ignore', 'commands': [ - 'yarn -s test:accessibility --json > pa11y-ci-results.json 1>&2', + 'yarn wait-on http://$HOST:$PORT', + 'yarn -s test:accessibility --json > pa11y-ci-results.json', ], } diff --git a/yarn.lock b/yarn.lock index f9b21f6e6fb..dd9d0942ad4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1796,6 +1796,18 @@ resolved "https://registry.yarnpkg.com/@grafana/tsconfig/-/tsconfig-1.0.0-rc1.tgz#d07ea16755a50cae21000113f30546b61647a200" integrity sha512-nucKPGyzlSKYSiJk5RA8GzMdVWhdYNdF+Hh65AXxjD9PlY69JKr5wANj8bVdQboag6dgg0BFKqgKPyY+YtV4Iw== +"@hapi/hoek@^9.0.0": + version "9.2.0" + resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.2.0.tgz#f3933a44e365864f4dad5db94158106d511e8131" + integrity sha512-sqKVVVOe5ivCaXDWivIJYVSaEgdQK9ul7a4Kity5Iw7u9+wBAPbX1RMSnLLmp7O4Vzj0WOWwMAJsTL00xwaNug== + +"@hapi/topo@^5.0.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-5.1.0.tgz#dc448e332c6c6e37a4dc02fd84ba8d44b9afb012" + integrity sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg== + dependencies: + "@hapi/hoek" "^9.0.0" + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -3361,6 +3373,23 @@ "@sentry/types" "5.25.0" tslib "^1.9.3" +"@sideway/address@^4.1.0": + version "4.1.2" + resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.2.tgz#811b84333a335739d3969cfc434736268170cad1" + integrity sha512-idTz8ibqWFrPU8kMirL0CoPH/A29XOzzAzpyN3zQ4kAWnzmNfFmRaoMNN6VI8ske5M73HZyhIaW4OuSFIdM4oA== + dependencies: + "@hapi/hoek" "^9.0.0" + +"@sideway/formula@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.0.tgz#fe158aee32e6bd5de85044be615bc08478a0a13c" + integrity sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg== + +"@sideway/pinpoint@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" + integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== + "@sinonjs/commons@^1", "@sinonjs/commons@^1.6.0", "@sinonjs/commons@^1.7.0": version "1.7.0" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.7.0.tgz#f90ffc52a2e519f018b13b6c4da03cbff36ebed6" @@ -6739,7 +6768,7 @@ axe-core@^4.2.0: resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.3.2.tgz#fcf8777b82c62cfc69c7e9f32c0d2226287680e7" integrity sha512-5LMaDRWm8ZFPAEdzTYmgjjEdj1YnQcpfrVajO/sn/LhbpGp0Y0H64c2hLZI1gRMxfA+w1S71Uc/nHaOXgcCvGg== -axios@0.21.1: +axios@0.21.1, axios@^0.21.1: version "0.21.1" resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== @@ -14501,6 +14530,17 @@ jju@~1.4.0: resolved "https://registry.yarnpkg.com/jju/-/jju-1.4.0.tgz#a3abe2718af241a2b2904f84a625970f389ae32a" integrity sha1-o6vicYryQaKykE+EpiWXDzia4yo= +joi@^17.4.0: + version "17.4.2" + resolved "https://registry.yarnpkg.com/joi/-/joi-17.4.2.tgz#02f4eb5cf88e515e614830239379dcbbe28ce7f7" + integrity sha512-Lm56PP+n0+Z2A2rfRvsfWVDXGEWjXxatPopkQ8qQ5mxCEhwHG+Ettgg5o98FFaxilOxozoa14cFhrE/hOzh/Nw== + dependencies: + "@hapi/hoek" "^9.0.0" + "@hapi/topo" "^5.0.0" + "@sideway/address" "^4.1.0" + "@sideway/formula" "^3.0.0" + "@sideway/pinpoint" "^2.0.0" + jquery@3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.5.1.tgz#d7b4d08e1bfdb86ad2f1a3d039ea17304717abb5" @@ -20545,7 +20585,7 @@ rxjs-spy@8.0.0: rxjs-report-usage "^1.0.4" stacktrace-gps "^3.0.2" -rxjs@7.3.0: +rxjs@7.3.0, rxjs@^7.1.0: version "7.3.0" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.3.0.tgz#39fe4f3461dc1e50be1475b2b85a0a88c1e938c6" integrity sha512-p2yuGIg9S1epc3vrjKf6iVb3RCaAYjYskkO+jHIaV0IjOPlJop4UnodOoFb2xeNwlguqLYvGw1b1McillYb5Gw== @@ -23233,6 +23273,17 @@ w3c-xmlserializer@^2.0.0: dependencies: xml-name-validator "^3.0.0" +wait-on@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/wait-on/-/wait-on-6.0.0.tgz#7e9bf8e3d7fe2daecbb7a570ac8ca41e9311c7e7" + integrity sha512-tnUJr9p5r+bEYXPUdRseolmz5XqJTTj98JgOsfBn7Oz2dxfE2g3zw1jE+Mo8lopM3j3et/Mq1yW7kKX6qw7RVw== + dependencies: + axios "^0.21.1" + joi "^17.4.0" + lodash "^4.17.21" + minimist "^1.2.5" + rxjs "^7.1.0" + walker@^1.0.7, walker@~1.0.5: version "1.0.7" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb"