test: add comprehensive testing infrastructure
- Add npm test scripts for build, markdown, HTML, and link validation - Install markdownlint-cli for content quality checks - Install html-validate for HTML5 conformity validation - Add htmltest (via devbox) for internal/external link checking - Configure test rules in .htmltest.yml, .htmlvalidate.json, .markdownlint.json - Add GitHub Actions workflow for automated CI testing - Add TESTING.md documentation for test usage
This commit is contained in:
parent
d6f3d67724
commit
12e31ede91
6 changed files with 163 additions and 0 deletions
62
TESTING.md
Normal file
62
TESTING.md
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
# Hugo Site Testing
|
||||
|
||||
Dieses Projekt verwendet mehrere automatisierte Tests zur Qualitätssicherung.
|
||||
|
||||
## Verfügbare Tests
|
||||
|
||||
### 1. Build-Test
|
||||
```bash
|
||||
npm run test:build
|
||||
```
|
||||
Prüft ob die Hugo-Seite überhaupt baut und zeigt Warnungen/Fehler an.
|
||||
|
||||
### 2. Markdown-Linting
|
||||
```bash
|
||||
npm run test:markdown
|
||||
```
|
||||
Validiert Markdown-Dateien auf Stilprobleme und Best Practices.
|
||||
|
||||
### 3. HTML-Validierung
|
||||
```bash
|
||||
npm run test:html
|
||||
```
|
||||
Prüft die generierte HTML auf HTML5-Konformität.
|
||||
|
||||
### 4. Link-Checker
|
||||
```bash
|
||||
npm run test:links
|
||||
```
|
||||
Testet alle internen und externen Links auf Gültigkeit.
|
||||
|
||||
### Alle Tests ausführen
|
||||
```bash
|
||||
npm test
|
||||
```
|
||||
|
||||
### Schnelle Tests (ohne Link-Check)
|
||||
```bash
|
||||
npm run test:quick
|
||||
```
|
||||
|
||||
## Konfigurationsdateien
|
||||
|
||||
- `.htmltest.yml` - Link-Checker-Konfiguration
|
||||
- `.htmlvalidate.json` - HTML-Validierungs-Regeln
|
||||
- `.markdownlint.json` - Markdown-Linting-Regeln
|
||||
|
||||
## CI/CD Integration
|
||||
|
||||
GitHub Actions führt diese Tests automatisch bei jedem Push/PR aus:
|
||||
- `.github/workflows/test.yml`
|
||||
|
||||
## Lokale Entwicklung
|
||||
|
||||
Vor dem Commit empfohlen:
|
||||
```bash
|
||||
npm run test:quick # Schnelle Tests
|
||||
```
|
||||
|
||||
Vor dem Push:
|
||||
```bash
|
||||
npm test # Alle Tests inkl. Link-Check
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue