migration: api-depot postgres #1948
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |