mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 04:05:40 +01:00
51dc32f818
* Updated 'ui_ut_run.sh' script to enforce formatting Signed-off-by: bupd <bupdprasanth@gmail.com>
23 lines
472 B
Bash
Executable File
23 lines
472 B
Bash
Executable File
#!/bin/bash
|
|
set -x
|
|
set -e
|
|
|
|
cd ./src/portal
|
|
npm install -g -q --no-progress @angular/cli
|
|
npm install -g -q --no-progress karma
|
|
npm install -q --no-progress
|
|
|
|
# Run format and check for changes
|
|
npm run format
|
|
|
|
# Check if any files were changed by formatting
|
|
if [[ -n $(git status --porcelain) ]]; then
|
|
echo "Formatting issues found. Please run 'npm run format' and commit the changes."
|
|
exit 1
|
|
fi
|
|
|
|
# Lint and run tests
|
|
npm run lint
|
|
npm run lint:style
|
|
npm run test && cd -
|