Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 52 additions & 24 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,37 @@ jobs:
- 'dev/user-frontend-ionic/**'
- 'dev/user-frontend-ionic/.eslintrc.js'

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Read Node.js version
id: node_version
if: steps.changes.outputs.frontend == 'true'
if: ${{ steps.changes.outputs.frontend == 'true' }}
run: echo NODE_VERSION=$(cat dev/user-frontend-ionic/.nvmrc) >> $GITHUB_OUTPUT

- name: Set up Node.js
if: steps.changes.outputs.frontend == 'true'
if: ${{ steps.changes.outputs.frontend == 'true' }}
uses: actions/setup-node@v4
with:
node-version: ${{ steps.node_version.outputs.NODE_VERSION }}
cache: "pnpm"
cache-dependency-path: pnpm-lock.yaml

- name: Prepare environment
if: steps.changes.outputs.frontend == 'true'
if: ${{ steps.changes.outputs.frontend == 'true' }}
run: |
cd dev/user-frontend-ionic
cp angular.json.dist angular.json
cp -r src/theme/app-theme-dist src/theme/app-theme
npm ci
pnpm i --frozen-lockfile --filter .

- name: Lint
if: steps.changes.outputs.frontend == 'true'
if: ${{ steps.changes.outputs.frontend == 'true' }}
run: |
cd dev/user-frontend-ionic
npm run lint
pnpm run lint


backend-main:
Expand All @@ -72,28 +79,35 @@ jobs:
- 'dev/user-backend-nest/main/**/*.ts'
- 'dev/user-backend-nest/main/.eslintrc.js'

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Read Node.js version
id: node_version
if: steps.changes.outputs.main == 'true'
if: ${{ steps.changes.outputs.main == 'true' }}
run: echo NODE_VERSION=$(cat dev/user-backend-nest/.nvmrc) >> $GITHUB_OUTPUT

- name: Set up Node.js
if: steps.changes.outputs.main == 'true'
if: ${{ steps.changes.outputs.main == 'true' }}
uses: actions/setup-node@v4
with:
node-version: ${{ steps.node_version.outputs.NODE_VERSION }}
cache: "pnpm"
cache-dependency-path: pnpm-lock.yaml

- name: Prepare environment
if: steps.changes.outputs.main == 'true'
if: ${{ steps.changes.outputs.main == 'true' }}
run: |
cd dev/user-backend-nest/main
npm ci
pnpm i --frozen-lockfile --filter .

- name: Lint
if: steps.changes.outputs.main == 'true'
if: ${{ steps.changes.outputs.main == 'true' }}
run: |
cd dev/user-backend-nest/main
npm run lint
pnpm run lint


backend-microservices:
Expand Down Expand Up @@ -185,28 +199,35 @@ jobs:
- 'dev/user-backend-nest/microservices/statistics/**/*.ts'
- 'dev/user-backend-nest/microservices/statistics/.eslintrc.js'

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Read Node.js version
id: node_version
if: steps.changes.outputs[${{ matrix.service }}] == 'true'
if: ${{ steps.changes.outputs[matrix.service] == 'true' }}
run: echo NODE_VERSION=$(cat dev/user-backend-nest/.nvmrc) >> $GITHUB_OUTPUT

- name: Set up Node.js
if: steps.changes.outputs[${{ matrix.service }}] == 'true'
if: ${{ steps.changes.outputs[matrix.service] == 'true' }}
uses: actions/setup-node@v4
with:
node-version: ${{ steps.node_version.outputs.NODE_VERSION }}
cache: "pnpm"
cache-dependency-path: pnpm-lock.yaml

- name: Prepare environment
if: steps.changes.outputs[${{ matrix.service }}] == 'true'
if: ${{ steps.changes.outputs[matrix.service] == 'true' }}
run: |
cd dev/user-backend-nest/microservices/${{ matrix.service }}
npm ci
pnpm i --frozen-lockfile --filter .

- name: Lint ${{ matrix.service }}
if: steps.changes.outputs[${{ matrix.service }}] == 'true'
if: ${{ steps.changes.outputs[matrix.service] == 'true' }}
run: |
cd dev/user-backend-nest/microservices/${{ matrix.service }}
npm run lint
pnpm run lint

connectors:
runs-on: ubuntu-latest
Expand All @@ -233,25 +254,32 @@ jobs:
- 'dev/connectors/multi-cms-connector/**/*.ts'
- 'dev/connectors/multi-cms-connector/.eslintrc.js'

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Read Node.js version
id: node_version
if: steps.changes.outputs[${{ matrix.service }}] == 'true'
if: ${{ steps.changes.outputs[matrix.service] == 'true' }}
run: echo NODE_VERSION=$(cat dev/connectors/${{ matrix.service }}/.nvmrc) >> $GITHUB_OUTPUT

- name: Set up Node.js
if: steps.changes.outputs[${{ matrix.service }}] == 'true'
if: ${{ steps.changes.outputs[matrix.service] == 'true' }}
uses: actions/setup-node@v4
with:
node-version: ${{ steps.node_version.outputs.NODE_VERSION }}
cache: "pnpm"
cache-dependency-path: pnpm-lock.yaml

- name: Prepare environment
if: steps.changes.outputs[${{ matrix.service }}] == 'true'
if: ${{ steps.changes.outputs[matrix.service] == 'true' }}
run: |
cd dev/connectors/${{ matrix.service }}
npm ci
pnpm i --frozen-lockfile --filter .

- name: Lint ${{ matrix.service }}
if: steps.changes.outputs[${{ matrix.service }}] == 'true'
if: ${{ steps.changes.outputs[matrix.service] == 'true' }}
run: |
cd dev/connectors/${{ matrix.service }}
npm run lint
pnpm run lint
25 changes: 16 additions & 9 deletions .github/workflows/update libs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,50 +26,57 @@ jobs:
packageJson:
- '**/package.json'

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Set up Node.js
if: steps.changes.outputs.packageJson == 'true'
if: ${{ steps.changes.outputs.packageJson == 'true' }}
uses: actions/setup-node@v4
with:
node-version: '20'
cache: "pnpm"
cache-dependency-path: pnpm-lock.yaml

- name: Install libs
if: steps.changes.outputs.packageJson == 'true'
run: npm run ci
if: ${{ steps.changes.outputs.packageJson == 'true' }}
run: pnpm run ci

- name: Run the dependency update script
if: steps.changes.outputs.packageJson == 'true'
if: ${{ steps.changes.outputs.packageJson == 'true' }}
run: |
chmod +x generateLibraryList.bash
./generateLibraryList.bash

- name: Check for changes
id: diff
if: steps.changes.outputs.packageJson == 'true'
if: ${{ steps.changes.outputs.packageJson == 'true' }}
run: |
git config core.fileMode false
git diff -w --ignore-blank-lines
echo "CHANGES=$(( $(git diff -w --ignore-blank-lines | wc -l) > 0 ? 1 : 0 ))" >> $GITHUB_OUTPUT

- name: Add changes to Git
if: steps.changes.outputs.packageJson == 'true' && steps.diff.outputs.CHANGES == 1 && github.event.pull_request.head.repo.full_name == github.repository
if: ${{ steps.changes.outputs.packageJson == 'true' && steps.diff.outputs.CHANGES == 1 && github.event.pull_request.head.repo.full_name == github.repository }}
run: |
git add -A

- name: Commit changes
if: steps.changes.outputs.packageJson == 'true' && steps.diff.outputs.CHANGES == 1 && github.event.pull_request.head.repo.full_name == github.repository
if: ${{ steps.changes.outputs.packageJson == 'true' && steps.diff.outputs.CHANGES == 1 && github.event.pull_request.head.repo.full_name == github.repository }}
run: |
git config --local user.name "GitHub Action"
git config --local user.email "action@github.com"
git commit -m "docs: update library list" || echo "No changes to commit"

- name: Push changes
if: steps.changes.outputs.packageJson == 'true' && steps.diff.outputs.CHANGES == 1 && github.event.pull_request.head.repo.full_name == github.repository
if: ${{ steps.changes.outputs.packageJson == 'true' && steps.diff.outputs.CHANGES == 1 && github.event.pull_request.head.repo.full_name == github.repository }}
run: git push origin HEAD:${{ github.head_ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Fork detected
if: steps.changes.outputs.packageJson == 'true' && steps.diff.outputs.CHANGES == 1 && github.event.pull_request.head.repo.full_name != github.repository
if: ${{ steps.changes.outputs.packageJson == 'true' && steps.diff.outputs.CHANGES == 1 && github.event.pull_request.head.repo.full_name != github.repository }}
run: |
echo "La liste des dépendances doit être mise à jour."
echo "A cause d'une limitation de GitHub Actions, il est impossible de mettre à jour la liste des dépendances depuis un fork."
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

#### Autres
* Mises à jour des dépendances suite aux alertes CVE
* Remplacelement de NPM par PNPM

### Backend
#### New features
Expand All @@ -25,6 +26,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

#### Autres
* Mises à jour des dépendances suite aux alertes CVE
* Remplacelement de NPM par PNPM

### Connecteurs
#### New features
Expand All @@ -33,6 +35,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

#### Autres
* Mises à jour des dépendances suite aux alertes CVE
* Remplacelement de NPM par PNPM

## 2.0.0 (2025-07-16)

Expand Down
12 changes: 10 additions & 2 deletions ci-config/gitlab-example/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,19 @@ stages:
- build-deploy-docker

cache:
key: ${CI_COMMIT_REF_SLUG}
key:
files:
- pnpm-lock.yaml
paths:
- '${CI_PROJECT_DIR}/.npm/'
- '${CI_PROJECT_DIR}/.pnpm-store'
policy: pull-push

before_script:
- npm install --global corepack@latest
- corepack enable
- corepack prepare pnpm@latest-10 --activate
- pnpm config set store-dir .pnpm-store

workflow:
# La pipeline ne se déclenchera que si les modifications ont eu lieu sur les branches suivantes
rules:
Expand Down
12 changes: 8 additions & 4 deletions ci-config/gitlab-example/backend/templates-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@
SERVICE_PATH: '${CI_PROJECT_DIR}/${BACKEND_PATH}/${SERVICE_FOLDER}'
image: node:$NODE_VERSION
before_script:
- npm install --global corepack@latest
- corepack enable
- corepack prepare pnpm@latest-10 --activate
- pnpm config set store-dir ${CI_PROJECT_DIR}/.pnpm-store
- cd ${SERVICE_PATH}
- *microservice_get_full_image_tag
- npm ci --cache ${CI_PROJECT_DIR}/.npm --prefer-offline
- pnpm install --frozen-lockfile
script:
- npm run lint
- npm run build
- npm ci --cache ${CI_PROJECT_DIR}/.npm --prefer-offline --omit=dev
- pnpm run lint
- pnpm run build
- pnpm install --frozen-lockfile --prod
artifacts:
paths:
- '${SERVICE_PATH}/node_modules'
Expand Down
12 changes: 8 additions & 4 deletions ci-config/gitlab-example/connectors/templates-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@
CONNECTOR_PATH: '${CI_PROJECT_DIR}/${CONNECTORS_PATH}/${CONNECTOR_FOLDER}'
image: node:$NODE_VERSION
before_script:
- npm install --global corepack@latest
- corepack enable
- corepack prepare pnpm@latest-10 --activate
- pnpm config set store-dir ${CI_PROJECT_DIR}/.pnpm-store
- cd ${CONNECTOR_PATH}
- *connector_get_full_image_tag
- npm ci --cache ${CI_PROJECT_DIR}/.npm --prefer-offline
- pnpm install --frozen-lockfile
script:
- npm run lint
- npm run build
- npm ci --cache ${CI_PROJECT_DIR}/.npm --prefer-offline --omit=dev
- pnpm run lint
- pnpm run build
- pnpm install --frozen-lockfile --prod
artifacts:
paths:
- '${CONNECTOR_PATH}/node_modules'
Expand Down
8 changes: 6 additions & 2 deletions ci-config/gitlab-example/frontend/templates-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,18 @@
SECURE_FILES_DOWNLOAD_PATH: "./src/environments/firebase/web"
image: node:$NODE_VERSION
before_script:
- npm install --global corepack@latest
- corepack enable
- corepack prepare pnpm@latest-10 --activate
- pnpm config set store-dir ${CI_PROJECT_DIR}/.pnpm-store
- cd ${CI_PROJECT_DIR}/${FRONTEND_PATH}
- *pwa_get_full_image_tag
- npm ci --cache ${CI_PROJECT_DIR}/.npm --prefer-offline
- pnpm install --frozen-lockfile
- mkdir -p ${SECURE_FILES_DOWNLOAD_PATH} && curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash
- ls -al src/environments/firebase/web
- mkdir -p src/assets/stubs && cp -v ${SECURE_FILES_DOWNLOAD_PATH}/${FIREBASE_FILENAME} "src/assets/stubs/firebase-environment.json"
script:
- npm run build -- --configuration=${PWA_ENV_CONFIG_NAME}
- pnpm run build -- --configuration=${PWA_ENV_CONFIG_NAME}
artifacts:
paths:
- '${CI_PROJECT_DIR}/${FRONTEND_PATH}/www/'
Expand Down
Loading