From f654152dc8965fa8e9bb79bb3615365c8489ced6 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Wed, 29 Jun 2022 15:04:52 +0100 Subject: [PATCH] Chore: split betterer into it's own CI step and allow failures for now (#51543) * split betterer into it's own CI step and allow failures for now * Run make drone Co-authored-by: dsotirakis --- .drone.yml | 16 +++++++++++++++- package.json | 2 +- scripts/drone/pipelines/main.star | 4 +++- scripts/drone/pipelines/pr.star | 2 ++ scripts/drone/steps/lib.star | 13 +++++++++++++ 5 files changed, 34 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 7b860298c21..9dac0630448 100644 --- a/.drone.yml +++ b/.drone.yml @@ -42,6 +42,13 @@ steps: TEST_MAX_WORKERS: 50% image: grafana/build-container:1.5.7 name: lint-frontend +- commands: + - yarn betterer ci + depends_on: + - yarn-install + failure: ignore + image: grafana/build-container:1.5.7 + name: betterer-frontend - commands: - yarn run ci:test-frontend depends_on: @@ -741,6 +748,13 @@ steps: TEST_MAX_WORKERS: 50% image: grafana/build-container:1.5.7 name: lint-frontend +- commands: + - yarn betterer ci + depends_on: + - yarn-install + failure: ignore + image: grafana/build-container:1.5.7 + name: betterer-frontend - commands: - yarn run ci:test-frontend depends_on: @@ -4783,6 +4797,6 @@ kind: secret name: gcp_upload_artifacts_key --- kind: signature -hmac: c9b6fd34c919d871a153c3d82bfe8d62f126f1c672bd14636147cdeafe827c10 +hmac: 12fbd61337ed1ae006e8c0ff71d1290e27b5910211369cdd47e1d604afd9befa ... diff --git a/package.json b/package.json index b334e954c69..dbf105c9bdf 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "lint": "yarn run lint:ts && yarn run lint:sass", "lint:ts": "eslint . --ext .js,.tsx,.ts --cache", "lint:sass": "yarn stylelint '{public/sass,packages}/**/*.scss' --cache", - "test:ci": "betterer ci && mkdir -p reports/junit && JEST_JUNIT_OUTPUT_DIR=reports/junit jest --ci --reporters=default --reporters=jest-junit -w ${TEST_MAX_WORKERS:-100%}", + "test:ci": "mkdir -p reports/junit && JEST_JUNIT_OUTPUT_DIR=reports/junit jest --ci --reporters=default --reporters=jest-junit -w ${TEST_MAX_WORKERS:-100%}", "lint:fix": "yarn lint:ts --fix", "packages:build": "lerna run clean && lerna run build --ignore @grafana-plugins/input-datasource", "packages:docsExtract": "rm -rf ./reports/docs && lerna run docsExtract", diff --git a/scripts/drone/pipelines/main.star b/scripts/drone/pipelines/main.star index 0e24f52383b..baad293a3be 100644 --- a/scripts/drone/pipelines/main.star +++ b/scripts/drone/pipelines/main.star @@ -41,7 +41,8 @@ load( 'upload_cdn_step', 'verify_gen_cue_step', 'test_a11y_frontend_step', - 'trigger_oss' + 'trigger_oss', + 'betterer_frontend_step' ) load( @@ -82,6 +83,7 @@ def main_test_frontend(): ] test_steps = [ lint_frontend_step(), + betterer_frontend_step(), test_frontend_step(), ] return pipeline( diff --git a/scripts/drone/pipelines/pr.star b/scripts/drone/pipelines/pr.star index 357e3190ac4..fd10cc3e749 100644 --- a/scripts/drone/pipelines/pr.star +++ b/scripts/drone/pipelines/pr.star @@ -32,6 +32,7 @@ load( 'verify_gen_cue_step', 'test_a11y_frontend_step', 'enterprise_downstream_step', + 'betterer_frontend_step', ) load( @@ -79,6 +80,7 @@ def pr_test_frontend(): ] test_steps = [ lint_frontend_step(), + betterer_frontend_step(), test_frontend_step(), ] return pipeline( diff --git a/scripts/drone/steps/lib.star b/scripts/drone/steps/lib.star index abfd8bfdffb..6b8d21d2481 100644 --- a/scripts/drone/steps/lib.star +++ b/scripts/drone/steps/lib.star @@ -539,6 +539,19 @@ def test_backend_integration_step(edition): ], } +def betterer_frontend_step(): + return { + 'name': 'betterer-frontend', + 'image': build_image, + 'depends_on': [ + 'yarn-install', + ], + 'commands': [ + 'yarn betterer ci', + ], + 'failure': 'ignore', + } + def test_frontend_step():