Skip to content

Commit 9a895dd

Browse files
committed
CI now checks embed and formattings.
1 parent b8eefbf commit 9a895dd

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,25 @@ jobs:
4343
- name: Check line endings
4444
run: yarn check-eol
4545

46+
- name: Regenerate Regor component metadata
47+
run: yarn regor-components
48+
49+
- name: Regenerate embedded scripts
50+
run: yarn embed
51+
52+
- name: Format repository
53+
run: yarn format
54+
55+
- name: Verify generated and formatted files are committed
56+
shell: bash
57+
run: |
58+
if [[ -n "$(git status --porcelain --untracked-files=all)" ]]; then
59+
echo "::error::Run yarn regor-components, yarn embed, and yarn format locally, then commit the resulting changes."
60+
git status --short --untracked-files=all
61+
git diff --stat
62+
exit 1
63+
fi
64+
4665
- name: Lint without changing files
4766
run: yarn lint:ci
4867

‎package.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
"lint": "yarn workspaces foreach --no-private --all --verbose --topological -- run lint",
4343
"lint:ci": "yarn workspaces foreach --no-private --all --verbose --topological -- exec biome check ./src --formatter-enabled=false",
4444
"check-eol": "yarn tsx scripts/check-eol.ts",
45-
"sync-purestack-version": "yarn tsx --no-warnings scripts/sync-purestack-version.ts",
4645
"bump-version": "yarn tsx --no-warnings scripts/bump-version.ts",
4746
"bundle": "yarn tsx --no-warnings scripts/bundle.ts",
4847
"cleanup": "yarn tsx --no-warnings scripts/cleanup.ts",
@@ -53,6 +52,6 @@
5352
"pack-vscode-ext": "yarn --cwd packages/ts-ssg-vscode build && yarn --cwd packages/ts-ssg-vscode package",
5453
"longest": "yarn tsx ./scripts/longest-functions.ts",
5554
"format": "biome format --write",
56-
"pre-commit": "yarn check-eol && yarn sync-purestack-version && yarn regor-components && yarn embed && yarn format && yarn lint && yarn build && yarn test run"
55+
"pre-commit": "yarn check-eol && yarn regor-components && yarn embed && yarn format && yarn lint && yarn build && yarn test run"
5756
}
5857
}

0 commit comments

Comments
 (0)