mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: use jest without grunt (#28558)
* Chore: use jest without grunt
* Run no-focus-convey-tests and no-only-tests as well
* Update lib.star test-backend script with no-focus test to run first
* Lets see a failing test
* Revert "Lets see a failing test"
This reverts commit cb6c6ed67d
.
* Update no-focus-convey test to a script
* Update scripts/lib.star
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update drone.yml
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
parent
5bed54170e
commit
f22d77100f
@ -66,6 +66,7 @@ steps:
|
||||
- name: test-backend
|
||||
image: grafana/build-container:1.2.28
|
||||
commands:
|
||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||
- ./bin/grabpl test-backend
|
||||
- ./bin/grabpl integration-tests
|
||||
depends_on:
|
||||
@ -313,6 +314,7 @@ steps:
|
||||
- name: test-backend
|
||||
image: grafana/build-container:1.2.28
|
||||
commands:
|
||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||
- ./bin/grabpl test-backend
|
||||
- ./bin/grabpl integration-tests
|
||||
depends_on:
|
||||
@ -760,6 +762,7 @@ steps:
|
||||
- name: test-backend
|
||||
image: grafana/build-container:1.2.28
|
||||
commands:
|
||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||
- ./bin/grabpl test-backend
|
||||
- ./bin/grabpl integration-tests
|
||||
depends_on:
|
||||
@ -1125,6 +1128,7 @@ steps:
|
||||
- name: test-backend
|
||||
image: grafana/build-container:1.2.28
|
||||
commands:
|
||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||
- ./bin/grabpl test-backend
|
||||
- ./bin/grabpl integration-tests
|
||||
depends_on:
|
||||
@ -1532,6 +1536,7 @@ steps:
|
||||
- name: test-backend
|
||||
image: grafana/build-container:1.2.28
|
||||
commands:
|
||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||
- ./bin/grabpl test-backend
|
||||
- ./bin/grabpl integration-tests
|
||||
depends_on:
|
||||
@ -1887,6 +1892,7 @@ steps:
|
||||
- name: test-backend
|
||||
image: grafana/build-container:1.2.28
|
||||
commands:
|
||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||
- ./bin/grabpl test-backend
|
||||
- ./bin/grabpl integration-tests
|
||||
depends_on:
|
||||
@ -2296,6 +2302,7 @@ steps:
|
||||
- name: test-backend
|
||||
image: grafana/build-container:1.2.28
|
||||
commands:
|
||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||
- ./bin/grabpl test-backend
|
||||
- ./bin/grabpl integration-tests
|
||||
depends_on:
|
||||
@ -2601,6 +2608,7 @@ steps:
|
||||
- name: test-backend
|
||||
image: grafana/build-container:1.2.28
|
||||
commands:
|
||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||
- ./bin/grabpl test-backend
|
||||
- ./bin/grabpl integration-tests
|
||||
depends_on:
|
||||
|
@ -90,7 +90,7 @@ The test suite consists of three types of tests: _Frontend tests_, _backend test
|
||||
We use [jest](https://jestjs.io/) for our frontend tests. Run them using Yarn:
|
||||
|
||||
```
|
||||
yarn jest
|
||||
yarn test
|
||||
```
|
||||
|
||||
### Run backend tests
|
||||
|
@ -12,9 +12,9 @@
|
||||
"e2e": "./e2e/start-and-run-suite",
|
||||
"e2e:debug": "./e2e/start-and-run-suite debug",
|
||||
"e2e:dev": "./e2e/start-and-run-suite dev",
|
||||
"jest": "jest --notify --watch",
|
||||
"test": "jest --notify --watch",
|
||||
"lint": "eslint . --ext .js,.tsx,.ts --cache",
|
||||
"jest-ci": "mkdir -p reports/junit && export JEST_JUNIT_OUTPUT_DIR=reports/junit && jest --ci --reporters=default --reporters=jest-junit -w ${TEST_MAX_WORKERS:-100%}",
|
||||
"test:ci": "mkdir -p reports/junit && export JEST_JUNIT_OUTPUT_DIR=reports/junit && jest --ci --reporters=default --reporters=jest-junit -w ${TEST_MAX_WORKERS:-100%}",
|
||||
"lint:fix": "yarn lint --fix",
|
||||
"packages:build": "lerna run clean && lerna run build --ignore @grafana-plugins/input-datasource",
|
||||
"packages:docsExtract": "rm -rf ./reports/docs && lerna run docsExtract",
|
||||
@ -37,12 +37,11 @@
|
||||
"stats": "webpack --mode production --config scripts/webpack/webpack.prod.js --profile --json > compilation-stats.json",
|
||||
"storybook": "cd packages/grafana-ui && yarn storybook --ci",
|
||||
"storybook:build": "cd packages/grafana-ui && yarn storybook:build",
|
||||
"test": "grunt test",
|
||||
"themes:generate": "ts-node --project ./scripts/cli/tsconfig.json ./scripts/cli/generateSassVariableFiles.ts",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"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 packages:typecheck && yarn run typecheck && yarn run test"
|
||||
"ci:test-frontend": "yarn run prettier:check && yarn run packages:typecheck && yarn run typecheck && yarn grunt no-only-tests && yarn run test:ci"
|
||||
},
|
||||
"grafana": {
|
||||
"whatsNewUrl": "https://grafana.com/docs/grafana/latest/guides/whats-new-in-v7-3/",
|
||||
|
@ -11,7 +11,6 @@ module.exports = function(config, grunt) {
|
||||
typecheckRoot: {
|
||||
command: 'yarn typecheck',
|
||||
},
|
||||
jest: 'yarn jest-ci',
|
||||
webpack: 'node ./node_modules/webpack/bin/webpack.js --config scripts/webpack/webpack.prod.js',
|
||||
};
|
||||
};
|
||||
|
@ -441,7 +441,9 @@ def test_backend_step():
|
||||
'lint-backend',
|
||||
],
|
||||
'commands': [
|
||||
# First execute non-integration tests in parallel, since it should be safe
|
||||
# First make sure that there are no tests with FocusConvey
|
||||
'[ $(grep FocusConvey -R pkg | wc -l) -eq "0" ] || exit 1',
|
||||
# Then execute non-integration tests in parallel, since it should be safe
|
||||
'./bin/grabpl test-backend',
|
||||
# Then execute integration tests in serial
|
||||
'./bin/grabpl integration-tests',
|
||||
|
Loading…
Reference in New Issue
Block a user