-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implementing github checks #34673
implementing github checks #34673
Changes from 35 commits
05978fb
ea16b0b
e038dae
6c1bed8
2cdd558
32fc41e
13295b0
54c092d
452786e
397e61b
780c119
ba7859c
bdf8963
36f47c3
5dc3280
c79888e
486700b
85ca6eb
eee0c0f
4939c73
461d8d9
90df9ad
43f3ad5
3a34748
30c2bb2
d870d66
f698889
3cb7b0c
d10d49d
069045b
2a47f89
0d4e270
a66c85a
fd66398
29f9279
497c404
fea3783
2bdf16c
fd9aa69
edf31e0
fd1c3b6
5132ba0
c40be8c
5b6cbc2
3a3e332
2a342cd
c1553fa
eeb80bb
8eb2247
53eddbe
a70415a
5e93457
2f499ba
2468edf
4518f66
7afca50
5754c39
b6fc022
3bd63d1
c1b9aa0
1f3105b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"envVars": { | ||
"appKey": "KIBANA_CI_REPORTER_KEY" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,77 +62,88 @@ module.exports = function (grunt) { | |
'--server.port=5610', | ||
]; | ||
|
||
const githubChecksReporter = title => ['run', 'github-checks-reporter', title, 'node']; | ||
const YARN = 'yarn'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should clean this up a bit by defining each task config with a helper, rather than splitting up the responsibilities into such tiny chunks. I also think we should avoid using the grunt config identifiers. I'd prefer if the names of each of these checks represented the script that used to execute them, maybe by using the script filename as the check name, like I assume something like eslint: scriptWithGithubChecks({
name: 'eslint',
args: ['--no-cache']
}),
apiIntegrationTests: scriptWithGithubChecks({
name: 'scripts/functional_tests',
title: 'API Integration Tests',
args: [
'--config', 'test/api_integration/config.js',
'--bail',
'--debug'
]
}) const scriptWithGithubChecks = ({ name, title = name, args = [] }) => ({
cmd: 'yarn',
args: [
'run',
'github-checks-reporter',
`scripts/${name}`,
'node',
`scripts/${name}`
...args
]
}) |
||
|
||
return { | ||
// used by the test and jenkins:unit tasks | ||
// runs the eslint script to check for linting errors | ||
eslint: { | ||
cmd: process.execPath, | ||
cmd: YARN, | ||
args: [ | ||
require.resolve('../../scripts/eslint'), | ||
...githubChecksReporter('eslint'), | ||
'scripts/eslint', | ||
'--no-cache' | ||
] | ||
}, | ||
|
||
sasslint: { | ||
cmd: process.execPath, | ||
cmd: YARN, | ||
args: [ | ||
require.resolve('../../scripts/sasslint') | ||
...githubChecksReporter('sasslint'), | ||
'scripts/sasslint' | ||
] | ||
}, | ||
|
||
// used by the test tasks | ||
// runs the check_file_casing script to ensure filenames use correct casing | ||
checkFileCasing: { | ||
cmd: process.execPath, | ||
cmd: YARN, | ||
args: [ | ||
require.resolve('../../scripts/check_file_casing'), | ||
...githubChecksReporter('checkFileCasing'), | ||
'scripts/check_file_casing', | ||
'--quiet' // only log errors, not warnings | ||
] | ||
}, | ||
|
||
// used by the test tasks | ||
// runs the check_core_api_changes script to ensure API changes are explictily accepted | ||
checkCoreApiChanges: { | ||
cmd: process.execPath, | ||
cmd: YARN, | ||
args: [ | ||
require.resolve('../../scripts/check_core_api_changes') | ||
...githubChecksReporter('checkCoreApiChange'), | ||
'scripts/check_core_api_changes' | ||
] | ||
}, | ||
|
||
// used by the test and jenkins:unit tasks | ||
// runs the typecheck script to check for Typescript type errors | ||
typeCheck: { | ||
cmd: process.execPath, | ||
cmd: YARN, | ||
args: [ | ||
require.resolve('../../scripts/type_check') | ||
...githubChecksReporter('typeCheck'), | ||
'scripts/type_check' | ||
] | ||
}, | ||
|
||
// used by the test and jenkins:unit tasks | ||
// ensures that all typescript files belong to a typescript project | ||
checkTsProjects: { | ||
cmd: process.execPath, | ||
cmd: YARN, | ||
args: [ | ||
require.resolve('../../scripts/check_ts_projects') | ||
...githubChecksReporter('checkTsProjects'), | ||
'scripts/check_ts_projects' | ||
] | ||
}, | ||
|
||
// used by the test and jenkins:unit tasks | ||
// runs the i18n_check script to check i18n engine usage | ||
i18nCheck: { | ||
cmd: process.execPath, | ||
cmd: YARN, | ||
args: [ | ||
require.resolve('../../scripts/i18n_check'), | ||
...githubChecksReporter('i18nCheck'), | ||
'scripts/i18n_check', | ||
'--ignore-missing', | ||
] | ||
}, | ||
|
||
// used by the test:server task | ||
// runs all node.js/server mocha tests | ||
mocha: { | ||
cmd: process.execPath, | ||
cmd: YARN, | ||
args: [ | ||
require.resolve('../../scripts/mocha') | ||
...githubChecksReporter('mocha'), | ||
'scripts/mocha' | ||
] | ||
}, | ||
|
||
|
@@ -179,16 +190,18 @@ module.exports = function (grunt) { | |
options: { | ||
wait: true, | ||
}, | ||
cmd: process.execPath, | ||
cmd: YARN, | ||
args: [ | ||
...githubChecksReporter('verifyNotice'), | ||
'scripts/notice', | ||
'--validate' | ||
] | ||
}, | ||
|
||
apiIntegrationTests: { | ||
cmd: process.execPath, | ||
cmd: YARN, | ||
args: [ | ||
...githubChecksReporter('apiIntegrationTests'), | ||
'scripts/functional_tests', | ||
'--config', 'test/api_integration/config.js', | ||
'--bail', | ||
|
@@ -197,8 +210,9 @@ module.exports = function (grunt) { | |
}, | ||
|
||
serverIntegrationTests: { | ||
cmd: process.execPath, | ||
cmd: YARN, | ||
args: [ | ||
...githubChecksReporter('serverIntegrationTests'), | ||
'scripts/functional_tests', | ||
'--config', 'test/server_integration/http/ssl/config.js', | ||
'--config', 'test/server_integration/http/ssl_redirect/config.js', | ||
|
@@ -209,8 +223,9 @@ module.exports = function (grunt) { | |
}, | ||
|
||
interpreterFunctionalTestsRelease: { | ||
cmd: process.execPath, | ||
cmd: YARN, | ||
args: [ | ||
...githubChecksReporter('interpreterFunctionalTestsRelease'), | ||
'scripts/functional_tests', | ||
'--config', 'test/interpreter_functional/config.js', | ||
'--bail', | ||
|
@@ -220,8 +235,9 @@ module.exports = function (grunt) { | |
}, | ||
|
||
pluginFunctionalTestsRelease: { | ||
cmd: process.execPath, | ||
cmd: YARN, | ||
args: [ | ||
...githubChecksReporter('pluginFunctionalTestsRelease'), | ||
'scripts/functional_tests', | ||
'--config', 'test/plugin_functional/config.js', | ||
'--bail', | ||
|
@@ -231,8 +247,9 @@ module.exports = function (grunt) { | |
}, | ||
|
||
functionalTests: { | ||
cmd: process.execPath, | ||
cmd: YARN, | ||
args: [ | ||
...githubChecksReporter('functionalTests'), | ||
'scripts/functional_tests', | ||
'--config', 'test/functional/config.js', | ||
'--bail', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels like this should go in
github_checks_reporter.json