Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ jobs:
save-if: ${{ github.ref == 'refs/heads/main' }}
- run: cargo fmt --all -- --check
- run: cargo clippy --all-targets --all-features -- -D warnings
- name: Prepare official website
run: npm run site:build
- name: Check prepared component documentation
- name: Prepare and check official website
run: npm run site:test
- name: Upload prepared website
uses: actions/upload-artifact@v7
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ built executable. Component suites use `fixtures/<suite>/{index.sql,test.ts}` an
import the shared `fixture.ts` harness; root-level `*.spec.ts` files cover the
official site.

For changes to component documentation, run `npm run site:test` after preparing
the site with `npm run site:build`. This checks the same reference the site serves
against the public components and their template properties.
For changes to component documentation, run `npm run site:test`. It rebuilds
the site and checks the prepared reference against public components and their
template properties.

Run `npx playwright test --grep @accessibility` from `tests/end-to-end` to audit
the official site's component documentation and its live examples in SQLPage's
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"typecheck": "tsc && tsc -p tests/js && tsc -p tests/end-to-end",
"format": "biome format --write .",
"fix": "biome check --fix --unsafe .",
"presite:test": "npm run site:build",
"site:build": "node scripts/site-build.mjs",
"site:test": "node --test tests/js/component_documentation.checks.ts",
"site": "npm run build && npm run site:build && cd target/official-site && cargo run --locked --manifest-path ../../Cargo.toml"
Expand Down
2 changes: 1 addition & 1 deletion tests/js/component_documentation.checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function read_templates(): Map<string, TemplateProperties> {
function read_documentation(): Map<string, TemplateProperties> {
const migrations = fs
.readdirSync(MIGRATIONS_DIR)
.filter((file) => file.endsWith(".sql"))
.filter((file) => file.endsWith(".sql") && !file.endsWith(".down.sql"))
// SQLPage applies migrations in the order of their numeric prefix.
.sort(
(a, b) =>
Expand Down
Loading