-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (44 loc) · 2.05 KB
/
dev_ci.yml
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
name: Development CI (Continuous Integration)
on:
push:
branches: ["dev"]
workflow_dispatch: # Permet de déclencher manuellement le workflow via l'interface GitHub
permissions:
contents: read
concurrency:
group: "pages" # Groupe de concurrence pour éviter des exécutions multiples en même temps
cancel-in-progress: false
jobs:
security-and-tests:
runs-on: ubuntu-latest # Exécute le workflow sur la dernière version d'Ubuntu
steps:
- name: Checkout code
uses: actions/checkout@v4 # Récupère le code source du dépôt
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: npm install
- name: ESLint
run: npm run lint
- name: Depencies audit
run: npm audit --audit-level=moderate
# - name: Run Unit Tests
# run: npx jest --coverage # (commenté) Exécute les tests unitaires avec Jest et génère un rapport de couverture
- name: Build application
run: npm run build # Compile l'application
env:
NEXT_PUBLIC_GITHUB_BEARER_TOKEN: ${{ secrets.NEXT_PUBLIC_GITHUB_BEARER_TOKEN }}
NEXT_PUBLIC_APIKEY: ${{ secrets.NEXT_PUBLIC_APIKEY }}
NEXT_PUBLIC_AUTHDOMAIN: ${{ secrets.NEXT_PUBLIC_AUTHDOMAIN }}
NEXT_PUBLIC_PROJECTID: ${{ secrets.NEXT_PUBLIC_PROJECTID }}
NEXT_PUBLIC_STORAGEBUCKET: ${{ secrets.NEXT_PUBLIC_STORAGEBUCKET }}
NEXT_PUBLIC_MESSAGINGSENDERID: ${{ secrets.NEXT_PUBLIC_MESSAGINGSENDERID }}
NEXT_PUBLIC_APPID: ${{ secrets.NEXT_PUBLIC_APPID }}
NEXT_PUBLIC_MEASUREMENTID: ${{ secrets.NEXT_PUBLIC_MEASUREMENTID }}
NEXT_PUBLIC_S3_BUCKET_URL: ${{ secrets.NEXT_PUBLIC_S3_BUCKET_URL }}
NEXT_PUBLIC_S3_CV_URL: ${{ secrets.NEXT_PUBLIC_S3_CV_URL }}
NEXT_PUBLIC_GMAIL_USER: ${{ secrets.NEXT_PUBLIC_GMAIL_USER }}
NEXT_PUBLIC_GMAIL_PASSWORD: ${{ secrets.NEXT_PUBLIC_GMAIL_PASSWORD }}
NEXT_PUBLIC_PROTONMAIL_USER: ${{ secrets.NEXT_PUBLIC_PROTONMAIL_PASSWORD }}