Skip to content

Commit 9a1f2a7

Browse files
committed
chore: update CI
1 parent 982badf commit 9a1f2a7

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed

.cursor/plans/BIOME_MIGRATION.plan.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ todos:
2222
status: completed
2323
- id: phase1-migrate-react
2424
content: Migrate botonic-react (includes JSX) + update pre-commit
25-
status: in_progress
25+
status: completed
2626
- id: phase1-migrate-fb
2727
content: Migrate botonic-plugin-flow-builder + update pre-commit
2828
status: pending
@@ -214,7 +214,10 @@ files: ^(packages/botonic-core/|packages/botonic-plugin-hubtype-analytics/)
214214
- Investigate the 1 failing test
215215
- Ensure all tests pass
216216
- Review if any removed React imports need to be restored
217-
- Update CI workflow to use `LINT_COMMAND: npm run lint:check`
217+
218+
#### Completed Tasks
219+
220+
- ✓ Update CI workflow to use `LINT_COMMAND: npm run lint:check`
218221

219222
---
220223

.github/workflows/botonic-react-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ name: Botonic react tests
33
on:
44
push:
55
paths:
6-
- 'packages/botonic-react/**'
7-
- '.github/workflows/botonic-react-tests.yml'
6+
- "packages/botonic-react/**"
7+
- ".github/workflows/botonic-react-tests.yml"
88
workflow_dispatch:
99

1010
jobs:
@@ -14,6 +14,6 @@ jobs:
1414
with:
1515
PACKAGE_NAME: Botonic react tests
1616
PACKAGE: botonic-react
17-
BUILD_COMMAND: 'cd ../botonic-core && npm run build && cd ../botonic-react && npm run build'
17+
BUILD_COMMAND: "cd ../botonic-core && npm run build && cd ../botonic-react && npm run build"
1818
LINT_COMMAND: npm run lint:check
19-
NEEDS_CODECOV_UPLOAD: 'yes'
19+
NEEDS_CODECOV_UPLOAD: "yes"

.pre-commit-config.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ repos:
1919
hooks:
2020
- id: biome-check
2121
name: biome-check (Biome)
22-
entry: npx @biomejs/biome check --write --diagnostic-level=error
22+
entry: bash scripts/qa/biome-check.sh
2323
language: system
2424
files: ^packages/(botonic-core|botonic-plugin-hubtype-analytics|botonic-plugin-knowledge-bases|botonic-plugin-ai-agents|botonic-react)/
2525
types_or: [javascript, jsx, ts, tsx, json]
@@ -42,7 +42,6 @@ repos:
4242
language: system
4343
files: ^packages/botonic-plugin-flow-builder/
4444

45-
4645
- repo: https://github.com/Yelp/detect-secrets
4746
rev: v1.4.0
4847
hooks:

scripts/qa/biome-check.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
# Script for pre-commit hook that runs Biome check
3+
# - In CI (GitHub Actions): only verify (no --write)
4+
# - In local: apply fixes automatically (--write)
5+
6+
if [ "$CI" = "true" ]; then
7+
# CI environment: only verify, don't apply changes
8+
npx @biomejs/biome check --diagnostic-level=error "$@"
9+
else
10+
# Local environment: apply fixes automatically
11+
npx @biomejs/biome check --write --diagnostic-level=error "$@"
12+
fi

0 commit comments

Comments
 (0)