Skip to content

Commit

Permalink
CB-5820 fixes frontend build script (#3006)
Browse files Browse the repository at this point in the history
* CB-5820 fixes frontend build script

* CB-5820 fixes test for windows

* CB-5820 cleanup

* CB-5820 reverts back tests for package
  • Loading branch information
sergeyteleshev authored Oct 17, 2024
1 parent 8e4faa5 commit 5255e99
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
27 changes: 20 additions & 7 deletions deploy/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,35 @@ copy ..\config\DefaultConfiguration\GlobalConfiguration\.dbeaver\data-sources.js

move drivers cloudbeaver >NUL

echo Build static content
echo "Build static content"

cd ..\
mkdir .\cloudbeaver\web

cd ..\cloudbeaver\webapp
cd ..\webapp

call yarn
call yarn lerna bootstrap
call yarn lerna run bundle --no-bail --stream --scope=@cloudbeaver/product-default &::-- -- --env source-map
cd .\packages\product-default
call yarn run bundle

if %ERRORLEVEL% neq 0 (
echo 'Application build failed'
exit /b %ERRORLEVEL%
)

cd ..\..\
call yarn test

if %ERRORLEVEL% neq 0 (
echo 'Frontend tests failed'
exit /b %ERRORLEVEL%
)

cd ..\deploy

echo Copy static content
echo "Copy static content"

xcopy /E /Q ..\webapp\packages\product-default\lib cloudbeaver\web >NUL

echo Cloudbeaver is ready. Run run-server.bat in cloudbeaver folder to start the server.
echo "Cloudbeaver is ready. Run run-server.bat in cloudbeaver folder to start the server."

pause
9 changes: 8 additions & 1 deletion webapp/packages/core-cli/configs/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@ module.exports = {
testEnvironment: require.resolve('../tests/test.environment.js'),
rootDir: path.resolve('.'),
moduleFileExtensions: ['js', 'jsx', 'json'],
testMatch: ['<rootDir>/packages/*/dist/**/?(*.)+(spec|test).js?(x)', '<rootDir>/dist/**/?(*.)+(spec|test).js?(x)'],
testMatch: [
// unix
'<rootDir>/packages/*/dist/**/?(*.)+(spec|test).js?(x)',
'<rootDir>/dist/**/?(*.)+(spec|test).js?(x)',
// windows
'<rootDir>\\packages\\*\\dist\\**?(*.)+(spec|test).js?(x)',
'<rootDir>\\dist\\**?(*.)+(spec|test).js?(x)',
],
transformIgnorePatterns: [
'\\.pnp\\.[^\\/]+$',
'node_modules/(?!@ngrx|(?!deck.gl)|ng-dynamic)',
Expand Down

0 comments on commit 5255e99

Please sign in to comment.