-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (58 loc) · 2 KB
/
Copy pathstructure.yml
File metadata and controls
67 lines (58 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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=("saintBarthVolleyApp/frontend" "saintBarthVolleyApp/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 "saintBarthVolleyApp/frontend" ]; then
if [ ! -f "saintBarthVolleyApp/frontend/package.json" ]; then
echo "❌ Fichier manquant dans frontend : package.json"
INVALID=true
fi
fi
# Vérification interne backend
if [ -d "saintBarthVolleyApp/backend" ]; then
if [ ! -f "saintBarthVolleyApp/backend/package.json" ]; then
echo "❌ Fichier manquant dans backend : package.json"
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