mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-25 11:46:43 +01:00
update ui format github action
* Updated 'ui_ut_run.sh' script to enforce formatting Signed-off-by: bupd <bupdprasanth@gmail.com>
This commit is contained in:
parent
56e3f72c4b
commit
51dc32f818
5
.github/workflows/CI.yml
vendored
5
.github/workflows/CI.yml
vendored
@ -330,6 +330,11 @@ jobs:
|
|||||||
cd src/github.com/goharbor/harbor
|
cd src/github.com/goharbor/harbor
|
||||||
bash ./tests/showtime.sh ./tests/ci/ui_ut_run.sh
|
bash ./tests/showtime.sh ./tests/ci/ui_ut_run.sh
|
||||||
df -h
|
df -h
|
||||||
|
- name: Fail if format changes are detected
|
||||||
|
if: ${{ failure() }}
|
||||||
|
run: |
|
||||||
|
echo "Code formatting issues detected. Please run 'npm run format' locally and commit the changes."
|
||||||
|
exit 1
|
||||||
- name: Codecov For UI
|
- name: Codecov For UI
|
||||||
uses: codecov/codecov-action@v4
|
uses: codecov/codecov-action@v4
|
||||||
with:
|
with:
|
||||||
|
@ -6,7 +6,17 @@ cd ./src/portal
|
|||||||
npm install -g -q --no-progress @angular/cli
|
npm install -g -q --no-progress @angular/cli
|
||||||
npm install -g -q --no-progress karma
|
npm install -g -q --no-progress karma
|
||||||
npm install -q --no-progress
|
npm install -q --no-progress
|
||||||
# check code lint first then run ut test
|
|
||||||
|
# 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
|
||||||
npm run lint:style
|
npm run lint:style
|
||||||
npm run test && cd -
|
npm run test && cd -
|
||||||
|
Loading…
Reference in New Issue
Block a user