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
+14 -24
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):