Merge test a11y steps on starlark files

This commit is contained in:
dsotirakis 2021-11-10 14:35:03 +02:00
parent 486fbac23b
commit a3f6982476
4 changed files with 19 additions and 29 deletions

View File

@ -222,7 +222,7 @@ steps:
PORT: 3001
failure: ignore
image: buildkite/puppeteer
name: test-a11y-frontend-pr
name: test-a11y-frontend
- commands:
- ./scripts/ci-reference-docs-lint.sh ci
depends_on:
@ -3430,6 +3430,6 @@ kind: secret
name: drone_token
---
kind: signature
hmac: 21ecb408dfa778e70baa888dc5a3dc6f049aac7784ad0d7605b021cf27b02cd5
hmac: a1688fa08e5fd63309dd999be0542addea3a4e3ada2dbd1239a955ba3cac1c7e
...

View File

@ -86,7 +86,7 @@ def get_steps(edition, is_downstream=False):
e2e_tests_step(edition=edition),
build_storybook_step(edition=edition, ver_mode=ver_mode),
publish_storybook_step(edition=edition, ver_mode=ver_mode),
test_a11y_frontend_step(edition=edition),
test_a11y_frontend_step(ver_mode=ver_mode, edition=edition),
frontend_metrics_step(edition=edition),
build_frontend_docs_step(edition=edition),
copy_packages_for_docker_step(),

View File

@ -25,7 +25,7 @@ load(
'benchmark_ldap_step',
'validate_scuemata_step',
'ensure_cuetsified_step',
'test_a11y_frontend_step_pr',
'test_a11y_frontend_step',
)
load(
@ -79,7 +79,7 @@ def pr_pipelines(edition):
e2e_tests_server_step(edition=edition),
e2e_tests_step(edition=edition),
build_storybook_step(edition=edition, ver_mode=ver_mode),
test_a11y_frontend_step_pr(edition=edition),
test_a11y_frontend_step(ver_mode=ver_mode, edition=edition),
build_frontend_docs_step(edition=edition),
build_docs_website_step(),
copy_packages_for_docker_step(),

View File

@ -422,7 +422,19 @@ def lint_frontend_step():
],
}
def test_a11y_frontend_step(edition, port=3001):
def test_a11y_frontend_step(ver_mode, edition, port=3001):
commands = [
'yarn wait-on http://$HOST:$PORT',
]
if ver_mode == 'pr':
commands.extend([
'yarn run test:accessibility-pr',
])
else:
commands.extend([
'yarn run test:accessibility --json > pa11y-ci-results.json',
])
return {
'name': 'test-a11y-frontend' + enterprise2_suffix(edition),
'image': 'buildkite/puppeteer',
@ -435,29 +447,7 @@ def test_a11y_frontend_step(edition, port=3001):
'PORT': port,
},
'failure': 'ignore',
'commands': [
'yarn wait-on http://$HOST:$PORT',
'yarn run test:accessibility --json > pa11y-ci-results.json',
],
}
def test_a11y_frontend_step_pr(edition, port=3001):
return {
'name': 'test-a11y-frontend-pr' + enterprise2_suffix(edition),
'image': 'buildkite/puppeteer',
'depends_on': [
'end-to-end-tests-server' + enterprise2_suffix(edition),
],
'environment': {
'GRAFANA_MISC_STATS_API_KEY': from_secret('grafana_misc_stats_api_key'),
'HOST': 'end-to-end-tests-server' + enterprise2_suffix(edition),
'PORT': port,
},
'failure': 'ignore',
'commands': [
'yarn wait-on http://$HOST:$PORT',
'yarn run test:accessibility-pr',
],
'commands': commands,
}
def frontend_metrics_step(edition):