Skip to content

Commit a80c558

Browse files
committed
check ui lint and build in ci
1 parent fd64906 commit a80c558

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

Makefile

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ test:
1515
cd idp_cli && python -m pytest -v
1616

1717
# Run both linting and formatting in one command
18-
lint: ruff-lint format check-arn-partitions
18+
lint: ruff-lint format check-arn-partitions ui-lint ui-build
1919

2020
# Run linting checks and fix issues automatically
2121
ruff-lint:
@@ -38,7 +38,19 @@ lint-cicd:
3838
echo -e "$(RED)ERROR: Code formatting check failed!$(NC)"; \
3939
echo -e "$(YELLOW)Please run 'make format' locally to fix these issues.$(NC)"; \
4040
exit 1; \
41+
fi; \
42+
echo "All checks passed!"
43+
@echo "Frontend checks"
44+
@if ! make ui-lint; then \
45+
echo -e "$(RED)ERROR: UI lint failed$(NC)"; \
46+
exit 1; \
47+
fi
48+
49+
@if ! make ui-build; then \
50+
echo -e "$(RED)ERROR: UI build failed$(NC)"; \
51+
exit 1; \
4152
fi
53+
4254
@echo -e "$(GREEN)All code quality checks passed!$(NC)"
4355

4456
# Check CloudFormation templates for hardcoded AWS partition ARNs and service principals
@@ -90,6 +102,14 @@ typecheck-pr:
90102
python3 scripts/typecheck_pr_changes.py $(TARGET_BRANCH)
91103

92104

105+
ui-lint:
106+
@echo "Checking UI lint"
107+
cd src/ui && npm ci --prefer-offline --no-audit && npm run lint
108+
109+
ui-build:
110+
@echo "Checking UI build"
111+
cd src/ui && npm ci --prefer-offline --no-audit && npm run build
112+
93113
commit: lint test
94114
$(info Generating commit message...)
95115
export COMMIT_MESSAGE="$(shell q chat --no-interactive --trust-all-tools "Understand pending local git change and changes to be committed, then infer a commit message. Return this commit message only" | tail -n 1 | sed 's/\x1b\[[0-9;]*m//g')" && \

src/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"build": "npm run lint && vite build",
6464
"preview": "vite preview",
6565
"test": "vitest",
66-
"lint": "npx eslint \"src/**/*.{js,jsx}\""
66+
"lint": "eslint \"src/**/*.{js,jsx}\""
6767
},
6868
"eslintConfig": {
6969
"extends": [

0 commit comments

Comments
 (0)