Skip to content

chore(fon-000): pin dependencies #1109

chore(fon-000): pin dependencies

chore(fon-000): pin dependencies #1109

name: Integration checks
permissions:
contents: read
packages: read
on:
pull_request:
types: [opened, synchronize]
branches-ignore:
- 'dependabot/*'
workflow_call:
jobs:
build:
if: github.actor != 'dependabot[bot]'
timeout-minutes: 10
runs-on: ubuntu-latest
env:
TZ: Etc/UTC
DATABASE_URL: postgresql://fondation:secret@localhost:5435/fondation
COOKIE_SECRET: 'secret-48b86b07-8668-4e1d-86b8-ee62e97fec7e'
ORIGIN_URL: http://localhost:3000
FRONTEND_ORIGIN_URL: http://localhost:5173
S3_ACCESS_KEY: fondation
S3_SECRET_KEY: fondation-secret
S3_BUCKET: sandbox-csm-fondation-reports-context
S3_REGION: eu-west-2
S3_FORCE_PATH_STYLE: 'true'
S3_ENDPOINT: http://localhost:9000
services:
postgres:
image: postgres:13.2@sha256:0eee5caa50478ef50b89062903a5b901eb818dfd577d2be6800a4735af75e53f
env:
POSTGRES_USER: fondation
POSTGRES_PASSWORD: secret
POSTGRES_DB: fondation
ports:
- 5435:5432
options: >-
--health-cmd pg_isready --health-interval 10s --health-timeout 5s
--health-retries 5
minio:
image: ghcr.io/betagouv/fondation-ci-minio:2025-11-11
env:
MINIO_ROOT_USER: ${{ env.S3_ACCESS_KEY }}
MINIO_ROOT_PASSWORD: ${{ env.S3_SECRET_KEY }}
ports:
- 9000:9000
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093
with:
version: 11.5.0
run_install: false
- name: Use Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version: '24.12.0'
cache: 'pnpm'
- name: install sheetjs
shell: bash
run: ./scripts/sheetjs.sh
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Build the shared models
run: pnpm --filter shared-models build
- name: Migrate Prisma
run: pnpm --filter api exec prisma migrate deploy
- name: Generate prisma
run: pnpm --filter api exec prisma generate --generator client --sql --config prisma.config.ts
- name: Types check
run: pnpm types:check
- name: Lint
run: node_modules/.bin/oxlint --deny-warnings
- name: Format
run: pnpm format:check
- name: Create buckets if necessary
run: node apps/api/scripts/init-buckets.js
- name: Test Api
env:
NODE_OPTIONS: --experimental-vm-modules
run: pnpm --filter api exec jest --runInBand --config ./test/jest/jest-all.config.ts
- name: truncate db
shell: bash
run: |
echo -n '' > ./truncate.sql
for table in \
'"identity_and_access_context"."users"' \
'"data_administration_context"."jurisdictions"' \
'"data_administration_context"."function"' \
'"nominations_context"."magistrat"' \
'"nominations_context"."session"' \
'"reports_context"."reports"' \
'"files_context"."files"' \
'"jobs"."ingestion_job"' \
'"docs"."agenda"'
do
echo "TRUNCATE $table CASCADE;" >> ./truncate.sql
done
pnpm --filter api exec prisma db execute --url $DATABASE_URL --file ../../truncate.sql
- name: Install Playwright
uses: ./.github/playwright
- name: Test Client
run: pnpm --filter client test:all
- name: Build
run: pnpm build