mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-18 18:01:23 +02:00
feat(ci): add smoke tests workflow + Lighthouse audit script
- .forgejo/workflows/smoke-tests.yml: checks all Go services + web apps every 6h, fails if any health check fails - scripts/lighthouse-audit.sh: runs Lighthouse on all 14 web apps Initial Lighthouse results: mana.how: Perf:80 A11y:96 BP:100 SEO:92 todo.mana.how: Perf:69 A11y:96 BP:100 SEO:100 chat.mana.how: Perf:83 A11y:100 BP:96 SEO:92 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
79a53cf70a
commit
456f99b89e
2 changed files with 151 additions and 0 deletions
60
scripts/lighthouse-audit.sh
Executable file
60
scripts/lighthouse-audit.sh
Executable file
|
|
@ -0,0 +1,60 @@
|
|||
#!/bin/bash
|
||||
# Lighthouse Performance Audit for all ManaCore web apps
|
||||
# Requires: npx (for lighthouse CLI)
|
||||
# Usage: ./scripts/lighthouse-audit.sh [--json]
|
||||
|
||||
set -e
|
||||
|
||||
JSON_MODE=false
|
||||
[ "$1" = "--json" ] && JSON_MODE=true
|
||||
|
||||
APPS=(
|
||||
"mana.how"
|
||||
"chat.mana.how"
|
||||
"todo.mana.how"
|
||||
"calendar.mana.how"
|
||||
"clock.mana.how"
|
||||
"contacts.mana.how"
|
||||
"storage.mana.how"
|
||||
"presi.mana.how"
|
||||
"nutriphi.mana.how"
|
||||
"zitare.mana.how"
|
||||
"photos.mana.how"
|
||||
"skilltree.mana.how"
|
||||
"picture.mana.how"
|
||||
"mukke.mana.how"
|
||||
)
|
||||
|
||||
RESULTS_DIR="lighthouse-results"
|
||||
mkdir -p "$RESULTS_DIR"
|
||||
|
||||
echo "=== ManaCore Lighthouse Audit ==="
|
||||
echo "Date: $(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
||||
echo ""
|
||||
|
||||
for app in "${APPS[@]}"; do
|
||||
echo -n "$app... "
|
||||
URL="https://$app"
|
||||
|
||||
OUTPUT="$RESULTS_DIR/$(echo $app | tr '.' '-').json"
|
||||
|
||||
npx lighthouse "$URL" \
|
||||
--output=json \
|
||||
--output-path="$OUTPUT" \
|
||||
--chrome-flags="--headless --no-sandbox" \
|
||||
--only-categories=performance,accessibility,best-practices,seo \
|
||||
--quiet 2>/dev/null
|
||||
|
||||
if [ -f "$OUTPUT" ]; then
|
||||
PERF=$(cat "$OUTPUT" | python3 -c "import sys,json; print(int(json.load(sys.stdin)['categories']['performance']['score']*100))" 2>/dev/null || echo "?")
|
||||
A11Y=$(cat "$OUTPUT" | python3 -c "import sys,json; print(int(json.load(sys.stdin)['categories']['accessibility']['score']*100))" 2>/dev/null || echo "?")
|
||||
BP=$(cat "$OUTPUT" | python3 -c "import sys,json; print(int(json.load(sys.stdin)['categories']['best-practices']['score']*100))" 2>/dev/null || echo "?")
|
||||
SEO=$(cat "$OUTPUT" | python3 -c "import sys,json; print(int(json.load(sys.stdin)['categories']['seo']['score']*100))" 2>/dev/null || echo "?")
|
||||
echo "Perf:$PERF A11y:$A11Y BP:$BP SEO:$SEO"
|
||||
else
|
||||
echo "FAILED"
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "Results saved to $RESULTS_DIR/"
|
||||
Loading…
Add table
Add a link
Reference in a new issue