Skip to content

Commit 1147a1e

Browse files
committed
ci: fail legibly on missing Pages source, document both test files
1 parent ee6b490 commit 1147a1e

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ jobs:
3232
# Parity tests read dist/index.html, so they must run after the build.
3333
- run: npm test
3434

35+
- uses: actions/configure-pages@v5
36+
3537
- uses: actions/upload-pages-artifact@v3
3638
with:
3739
path: ./dist

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,19 @@ npm run dev
1212
## Test
1313

1414
```sh
15+
npm run build # tests/parity.test.mjs reads dist/index.html
1516
npm test
1617
```
1718

18-
The suite compares the built `dist/index.html` against `tests/fixtures/baseline.html`,
19-
a frozen copy of the pre-Astro page, and fails on any change to the page's metadata,
20-
links, headings or rendered text. Run `npm run build` first.
19+
The suite has two parts:
20+
21+
- `tests/parity.test.mjs` compares the built `dist/index.html` against
22+
`tests/fixtures/baseline.html`, a frozen copy of the pre-Astro page, and fails on any
23+
change to its title, meta tags, canonical/favicon, JSON-LD, headings, anchors, images
24+
or rendered body text.
25+
- `tests/data.test.mjs` checks `src/data/*.ts` directly, independently of the build —
26+
entry counts, required fields and their types, Iconify icon id format, that every
27+
repo URL is on github.com, and uniqueness of library names and repos.
2128

2229
## Deploy
2330

0 commit comments

Comments
 (0)