Skip to content

feat(scraping): Fixes #103 - Matches #86

feat(scraping): Fixes #103 - Matches

feat(scraping): Fixes #103 - Matches #86

Workflow file for this run

name: 'Check Project Structure'
on:
pull_request:
types: [opened, edited, synchronize]
jobs:
check-structure:
runs-on: ubuntu-latest
steps:
- name: 'Checkout PR'
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: 'Verify project structure'
run: |
echo "🔍 Vérification de la structure du projet"
INVALID=false
# Fichiers racine obligatoires
ROOT_FILES=("README.md" "CONTRIBUTING.md" "INSTALL.md" "LICENSE")
for FILE in "${ROOT_FILES[@]}"; do
if [ ! -f "$FILE" ]; then
echo "❌ Fichier racine manquant : $FILE"
INVALID=true
else
echo "✅ Fichier trouvé : $FILE"
fi
done
# Dossiers obligatoires
DIRS=("app/frontend" "app/backend")
for DIR in "${DIRS[@]}"; do
if [ ! -d "$DIR" ]; then
echo "❌ Dossier manquant : $DIR"
INVALID=true
else
echo "✅ Dossier trouvé : $DIR"
fi
done
# Vérification interne frontend
if [ -d "app/frontend" ]; then
if [ ! -f "app/frontend/package.json" ]; then
echo "❌ Fichier manquant dans frontend : package.json"
INVALID=true
fi
if [ ! -f "app/frontend/.env.example" ]; then
echo "❌ Fichier manquant dans frontend : .env.example"
INVALID=true
fi
fi
# Vérification interne backend
if [ -d "app/backend" ]; then
if [ ! -f "app/backend/package.json" ]; then
echo "❌ Fichier manquant dans backend : package.json"
INVALID=true
fi
if [ ! -f "app/backend/.env.example" ]; then
echo "❌ Fichier manquant dans backend : .env.example"
INVALID=true
fi
fi
# Blocage si structure incorrecte
if [ "$INVALID" = true ]; then
echo ""
echo "⚠️ Structure du projet invalide. Veuillez ajouter les fichiers/dossiers manquants."
exit 1
else
echo "✅ Structure du projet OK"
fi