Skip to content

Commit

Permalink
[Manual Backport][1.3]Enhance the Build and Test workflow
Browse files Browse the repository at this point in the history
* Run GitHub workflow unit tests in band (opensearch-project#1306)
* Fix JUnit Reporter test (opensearch-project#1338)
* Add src/test_utils/ and src/core paths to the target clean patterns (opensearch-project#1442)
* Add code coverage reporting (opensearch-project#1478)
* Add release build verification workflow (opensearch-project#1502)
* Add Windows CI to the workflow (opensearch-project#2966)
* Add retrying flaky jest tests (opensearch-project#2967)
* Record functional test artifacts in case of failure (opensearch-project#3190)
* Increase timeout waiting for the exiting of an optimizer worker (opensearch-project#3193)
* Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194)
* Fix the version of Chrome to 107 to match `chromedriver@107.0.1`, the last that works on NodeJS v10
* Prevent `AbortError` from breaking unit tests for ExecutionContract

Signed-off-by: Miki <miki@amazon.com>
  • Loading branch information
AMoo-Miki authored and ananzh committed Jan 24, 2023
1 parent 78308ba commit f56ccb2
Show file tree
Hide file tree
Showing 8 changed files with 535 additions and 348 deletions.
457 changes: 457 additions & 0 deletions .github/workflows/build_and_test_workflow.yml

Large diffs are not rendered by default.

306 changes: 0 additions & 306 deletions .github/workflows/pr_check_workflow.yml

This file was deleted.

18 changes: 13 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
"built_assets",
".eslintcache",
".node_binaries",
"src/plugins/*/target"
"src/plugins/*/target",
"src/core/target",
"src/test_utils/target"
]
}
},
Expand All @@ -43,13 +45,16 @@
"test": "grunt test",
"test:bwc": "./scripts/bwctest_osd.sh",
"test:jest": "node scripts/jest",
"test:jest:coverage": "node scripts/jest --coverage",
"test:jest:ci": "node scripts/jest --ci --colors --runInBand",
"test:jest:ci:coverage": "node scripts/jest --ci --colors --runInBand --coverage",
"test:jest_integration": "node scripts/jest_integration",
"test:jest_integration:ci": "node scripts/jest_integration --ci --colors --max-old-space-size=5120",
"test:mocha": "node scripts/mocha",
"test:mocha:coverage": "grunt test:mochaCoverage",
"test:mocha:coverage": "yarn nyc --reporter=text-summary --reporter=lcov --report-dir=./target/opensearch-dashboards-coverage/mocha node scripts/mocha",
"test:ftr": "node scripts/functional_tests",
"test:ftr:server": "node scripts/functional_tests_server",
"test:ftr:runner": "node scripts/functional_test_runner",
"test:coverage": "grunt test:coverage",
"checkLicenses": "node scripts/check_licenses --dev",
"build-platform": "node scripts/build",
"build": "node scripts/build --all-platforms",
Expand Down Expand Up @@ -79,7 +84,8 @@
"**/@types/node": ">=10.17.17 <10.20.0",
"**/@types/react": "^16.14.23",
"**/ansi-regex": "^5.0.1",
"**/axios": "^0.21.4",
"!chromedriver/**/axios": "^0.21.4",
"chromedriver/**/axios": "^0.27.2",
"**/ejs": "^3.1.6",
"**/follow-redirects": "^1.15.2",
"**/front-matter": "^4.0.2",
Expand Down Expand Up @@ -107,6 +113,8 @@
"**/url-parse": "^1.5.8",
"**/shelljs": "0.8.5",
"**/unset-value": "^2.0.1",
"**/jest-config": "npm:@amoo-miki/jest-config@26.4.2-rc.1",
"**/jest-jasmine2": "npm:@amoo-miki/jest-jasmine2@26.4.2-rc.1",
"**/minimatch": "^3.0.5"
},
"workspaces": {
Expand Down Expand Up @@ -367,7 +375,7 @@
"chai": "3.5.0",
"chance": "1.0.18",
"cheerio": "0.22.0",
"chromedriver": "^91.0.1",
"chromedriver": "107.0.1",
"classnames": "2.2.6",
"compare-versions": "3.5.1",
"d3": "3.5.17",
Expand Down
6 changes: 4 additions & 2 deletions packages/osd-optimizer/src/worker/run_worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,13 @@ const exit = (code: number) => {
setTimeout(() => {
send(
workerMsgs.error(
new Error('process did not automatically exit within 5 seconds, forcing exit')
new Error(
`process did not automatically exit within 15 seconds (previous code: ${code}); forcing exit...`
)
)
);
process.exit(1);
}, 5000).unref();
}, 15000).unref();
};

// check for connected parent on an unref'd timer rather than listening
Expand Down
Loading

0 comments on commit f56ccb2

Please sign in to comment.