mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Build: Separate frontend linting from frontend testing (#39808)
* Create new lint-frontend step * Use lint-frontend step / separate from test-frontend * Fix typo
This commit is contained in:
parent
738d5e499e
commit
4017c5c800
114
.drone.yml
114
.drone.yml
@ -49,6 +49,18 @@ steps:
|
||||
depends_on:
|
||||
- initialize
|
||||
|
||||
- name: lint-frontend
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- yarn run prettier:check
|
||||
- yarn run lint
|
||||
- yarn run typecheck
|
||||
- yarn run check-strict
|
||||
environment:
|
||||
TEST_MAX_WORKERS: 50%
|
||||
depends_on:
|
||||
- initialize
|
||||
|
||||
- name: test-backend
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
@ -65,7 +77,7 @@ steps:
|
||||
environment:
|
||||
TEST_MAX_WORKERS: 50%
|
||||
depends_on:
|
||||
- lint-backend
|
||||
- lint-frontend
|
||||
|
||||
- name: build-backend
|
||||
image: grafana/build-container:1.4.3
|
||||
@ -309,6 +321,18 @@ steps:
|
||||
depends_on:
|
||||
- initialize
|
||||
|
||||
- name: lint-frontend
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- yarn run prettier:check
|
||||
- yarn run lint
|
||||
- yarn run typecheck
|
||||
- yarn run check-strict
|
||||
environment:
|
||||
TEST_MAX_WORKERS: 50%
|
||||
depends_on:
|
||||
- initialize
|
||||
|
||||
- name: test-backend
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
@ -325,7 +349,7 @@ steps:
|
||||
environment:
|
||||
TEST_MAX_WORKERS: 50%
|
||||
depends_on:
|
||||
- lint-backend
|
||||
- lint-frontend
|
||||
|
||||
- name: build-backend
|
||||
image: grafana/build-container:1.4.3
|
||||
@ -773,6 +797,18 @@ steps:
|
||||
depends_on:
|
||||
- initialize
|
||||
|
||||
- name: lint-frontend
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- yarn run prettier:check
|
||||
- yarn run lint
|
||||
- yarn run typecheck
|
||||
- yarn run check-strict
|
||||
environment:
|
||||
TEST_MAX_WORKERS: 50%
|
||||
depends_on:
|
||||
- initialize
|
||||
|
||||
- name: test-backend
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
@ -789,7 +825,7 @@ steps:
|
||||
environment:
|
||||
TEST_MAX_WORKERS: 50%
|
||||
depends_on:
|
||||
- lint-backend
|
||||
- lint-frontend
|
||||
|
||||
- name: build-backend
|
||||
image: grafana/build-container:1.4.3
|
||||
@ -1141,6 +1177,18 @@ steps:
|
||||
depends_on:
|
||||
- initialize
|
||||
|
||||
- name: lint-frontend
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- yarn run prettier:check
|
||||
- yarn run lint
|
||||
- yarn run typecheck
|
||||
- yarn run check-strict
|
||||
environment:
|
||||
TEST_MAX_WORKERS: 50%
|
||||
depends_on:
|
||||
- initialize
|
||||
|
||||
- name: test-backend
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
@ -1157,7 +1205,7 @@ steps:
|
||||
environment:
|
||||
TEST_MAX_WORKERS: 50%
|
||||
depends_on:
|
||||
- lint-backend
|
||||
- lint-frontend
|
||||
|
||||
- name: build-backend
|
||||
image: grafana/build-container:1.4.3
|
||||
@ -1713,6 +1761,18 @@ steps:
|
||||
depends_on:
|
||||
- initialize
|
||||
|
||||
- name: lint-frontend
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- yarn run prettier:check
|
||||
- yarn run lint
|
||||
- yarn run typecheck
|
||||
- yarn run check-strict
|
||||
environment:
|
||||
TEST_MAX_WORKERS: 50%
|
||||
depends_on:
|
||||
- initialize
|
||||
|
||||
- name: test-backend
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
@ -1729,7 +1789,7 @@ steps:
|
||||
environment:
|
||||
TEST_MAX_WORKERS: 50%
|
||||
depends_on:
|
||||
- lint-backend
|
||||
- lint-frontend
|
||||
|
||||
- name: build-backend
|
||||
image: grafana/build-container:1.4.3
|
||||
@ -2070,6 +2130,18 @@ steps:
|
||||
depends_on:
|
||||
- initialize
|
||||
|
||||
- name: lint-frontend
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- yarn run prettier:check
|
||||
- yarn run lint
|
||||
- yarn run typecheck
|
||||
- yarn run check-strict
|
||||
environment:
|
||||
TEST_MAX_WORKERS: 50%
|
||||
depends_on:
|
||||
- initialize
|
||||
|
||||
- name: test-backend
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
@ -2086,7 +2158,7 @@ steps:
|
||||
environment:
|
||||
TEST_MAX_WORKERS: 50%
|
||||
depends_on:
|
||||
- lint-backend
|
||||
- lint-frontend
|
||||
|
||||
- name: build-backend
|
||||
image: grafana/build-container:1.4.3
|
||||
@ -2635,6 +2707,18 @@ steps:
|
||||
depends_on:
|
||||
- initialize
|
||||
|
||||
- name: lint-frontend
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- yarn run prettier:check
|
||||
- yarn run lint
|
||||
- yarn run typecheck
|
||||
- yarn run check-strict
|
||||
environment:
|
||||
TEST_MAX_WORKERS: 50%
|
||||
depends_on:
|
||||
- initialize
|
||||
|
||||
- name: test-backend
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
@ -2651,7 +2735,7 @@ steps:
|
||||
environment:
|
||||
TEST_MAX_WORKERS: 50%
|
||||
depends_on:
|
||||
- lint-backend
|
||||
- lint-frontend
|
||||
|
||||
- name: build-backend
|
||||
image: grafana/build-container:1.4.3
|
||||
@ -2963,6 +3047,18 @@ steps:
|
||||
depends_on:
|
||||
- initialize
|
||||
|
||||
- name: lint-frontend
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- yarn run prettier:check
|
||||
- yarn run lint
|
||||
- yarn run typecheck
|
||||
- yarn run check-strict
|
||||
environment:
|
||||
TEST_MAX_WORKERS: 50%
|
||||
depends_on:
|
||||
- initialize
|
||||
|
||||
- name: test-backend
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
@ -2979,7 +3075,7 @@ steps:
|
||||
environment:
|
||||
TEST_MAX_WORKERS: 50%
|
||||
depends_on:
|
||||
- lint-backend
|
||||
- lint-frontend
|
||||
|
||||
- name: build-backend
|
||||
image: grafana/build-container:1.4.3
|
||||
@ -3468,6 +3564,6 @@ get:
|
||||
|
||||
---
|
||||
kind: signature
|
||||
hmac: 9d5ee57b9eff4ba3df8f70c8f7625c2ff1e07c2ce438182a97f81e6e8dbbb1dc
|
||||
hmac: 1a0a169db008e1e64f43227aef586c8a6f6c763ce8ffb91923ac60d4f94ca33f
|
||||
|
||||
...
|
||||
|
@ -8,6 +8,7 @@
|
||||
"scripts": {
|
||||
"api-tests": "jest --notify --watch --config=devenv/e2e-api-tests/jest.js",
|
||||
"build": "node ./node_modules/webpack/bin/webpack.js --config scripts/webpack/webpack.prod.js",
|
||||
"check-strict": "./scripts/ci-check-strict.sh",
|
||||
"dev": "webpack --progress --color --config scripts/webpack/webpack.dev.js",
|
||||
"e2e": "./e2e/start-and-run-suite",
|
||||
"e2e:debug": "./e2e/start-and-run-suite debug",
|
||||
@ -48,7 +49,7 @@
|
||||
"typecheck": "tsc --noEmit && yarn run packages:typecheck",
|
||||
"plugins:build-bundled": "grafana-toolkit plugin:bundle-managed",
|
||||
"watch": "yarn start -d watch,start core:start --watchTheme",
|
||||
"ci:test-frontend": "yarn run prettier:check && yarn run typecheck && yarn run lint && yarn run test:ci && yarn grafana-toolkit node-version-check && ./scripts/ci-check-strict.sh"
|
||||
"ci:test-frontend": "yarn run test:ci && yarn grafana-toolkit node-version-check"
|
||||
},
|
||||
"grafana": {
|
||||
"whatsNewUrl": "https://grafana.com/docs/grafana/next/whatsnew/whats-new-in-v8-2/",
|
||||
|
@ -1,6 +1,7 @@
|
||||
load(
|
||||
'scripts/drone/steps/lib.star',
|
||||
'lint_backend_step',
|
||||
'lint_frontend_step',
|
||||
'codespell_step',
|
||||
'shellcheck_step',
|
||||
'test_backend_step',
|
||||
@ -56,6 +57,7 @@ def get_steps(edition, is_downstream=False):
|
||||
codespell_step(),
|
||||
shellcheck_step(),
|
||||
lint_backend_step(edition=edition),
|
||||
lint_frontend_step(),
|
||||
test_backend_step(edition=edition),
|
||||
test_frontend_step(),
|
||||
build_backend_step(edition=edition, ver_mode=ver_mode, is_downstream=is_downstream),
|
||||
|
@ -1,6 +1,7 @@
|
||||
load(
|
||||
'scripts/drone/steps/lib.star',
|
||||
'lint_backend_step',
|
||||
'lint_frontend_step',
|
||||
'codespell_step',
|
||||
'shellcheck_step',
|
||||
'build_backend_step',
|
||||
@ -47,6 +48,7 @@ def pr_pipelines(edition):
|
||||
codespell_step(),
|
||||
shellcheck_step(),
|
||||
lint_backend_step(edition=edition),
|
||||
lint_frontend_step(),
|
||||
test_backend_step(edition=edition),
|
||||
test_frontend_step(),
|
||||
build_backend_step(edition=edition, ver_mode=ver_mode, variants=variants),
|
||||
|
@ -4,6 +4,7 @@ load(
|
||||
'build_image',
|
||||
'publish_image',
|
||||
'lint_backend_step',
|
||||
'lint_frontend_step',
|
||||
'codespell_step',
|
||||
'shellcheck_step',
|
||||
'test_backend_step',
|
||||
@ -83,6 +84,7 @@ def get_steps(edition, ver_mode):
|
||||
codespell_step(),
|
||||
shellcheck_step(),
|
||||
lint_backend_step(edition=edition),
|
||||
lint_frontend_step(),
|
||||
test_backend_step(edition=edition, tries=tries),
|
||||
test_frontend_step(),
|
||||
build_backend_step(edition=edition, ver_mode=ver_mode),
|
||||
|
@ -391,7 +391,7 @@ def test_frontend_step():
|
||||
'name': 'test-frontend',
|
||||
'image': build_image,
|
||||
'depends_on': [
|
||||
'lint-backend',
|
||||
'lint-frontend',
|
||||
],
|
||||
'environment': {
|
||||
'TEST_MAX_WORKERS': '50%',
|
||||
@ -401,6 +401,24 @@ def test_frontend_step():
|
||||
],
|
||||
}
|
||||
|
||||
def lint_frontend_step():
|
||||
return {
|
||||
'name': 'lint-frontend',
|
||||
'image': build_image,
|
||||
'depends_on': [
|
||||
'initialize',
|
||||
],
|
||||
'environment': {
|
||||
'TEST_MAX_WORKERS': '50%',
|
||||
},
|
||||
'commands': [
|
||||
'yarn run prettier:check',
|
||||
'yarn run lint',
|
||||
'yarn run typecheck',
|
||||
'yarn run check-strict',
|
||||
],
|
||||
}
|
||||
|
||||
def test_a11y_frontend_step(edition, port=3001):
|
||||
return {
|
||||
'name': 'test-a11y-frontend' + enterprise2_suffix(edition),
|
||||
|
Loading…
Reference in New Issue
Block a user