-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (55 loc) · 1.7 KB
/
node.js.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
57
58
59
60
61
62
name: Node.js CI
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
NEXT_PUBLIC_EDITEUR_URL: https://mes-adresses.data.gouv.fr
NEXT_PUBLIC_BAL_API_URL: https://api-bal.adresse.data.gouv.fr/v2
NEXT_PUBLIC_GEO_API_URL: https://geo.api.gouv.fr
NEXT_PUBLIC_ADRESSE_URL: https://adresse.data.gouv.fr
NEXT_PUBLIC_API_BAN_URL: https://plateforme.adresse.data.gouv.fr
NEXT_PUBLIC_BAN_API_DEPOT: https://plateforme-bal.adresse.data.gouv.fr/api-depot
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn
- name: Lint the codebase
run: yarn lint
- name: Build
run: yarn build
scan:
name: gitleaks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_LICENSE: ${{secrets.BAL_GITLEAKS_LICENSE}}
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
continue-on-error: true