From 73c0e562f9414b78bc3d499d2363c430f7179780 Mon Sep 17 00:00:00 2001 From: Fabien Mercier Date: Wed, 19 Jun 2024 14:59:38 +0200 Subject: [PATCH] MaJ de la configuration de Node --- ...{deploy-prod.yml => deploy-production.yml} | 13 ++++--------- .github/workflows/deploy-recette.yml | 13 ++++--------- .github/workflows/eslint.yml | 19 +++++++++---------- package-lock.json | 3 +++ package.json | 3 +++ 5 files changed, 23 insertions(+), 28 deletions(-) rename .github/workflows/{deploy-prod.yml => deploy-production.yml} (92%) diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-production.yml similarity index 92% rename from .github/workflows/deploy-prod.yml rename to .github/workflows/deploy-production.yml index 5e2d222..853e2e4 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-production.yml @@ -4,21 +4,16 @@ on: workflow_dispatch: push: branches: [main] -env: - branch: + jobs: dependencies: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [20.9.0] steps: - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} - cache: 'npm' + cache: npm + node-version-file: package.json - name: Retrieve cached dependencies id: retrieve-dependencies uses: actions/cache@v3 diff --git a/.github/workflows/deploy-recette.yml b/.github/workflows/deploy-recette.yml index 9adcb96..09ebd34 100644 --- a/.github/workflows/deploy-recette.yml +++ b/.github/workflows/deploy-recette.yml @@ -4,21 +4,16 @@ on: workflow_dispatch: push: branches: [recette] -env: - branch: + jobs: dependencies: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [20.9.0] steps: - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} - cache: 'npm' + cache: npm + node-version-file: package.json - name: Retrieve cached dependencies id: retrieve-dependencies uses: actions/cache@v3 diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 0df15ea..d51034e 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -2,21 +2,20 @@ name: ESLint on: push: - branches: [ main, recette ] + branches: [main, recette] pull_request: - branches: [ main, recette ] + branches: [main, recette] jobs: eslint: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [20] steps: - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + - uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node-version }} - - run: npm install - - run: npm run lint + cache: npm + node-version-file: package.json + - name: Install modules + run: npm i + - name: Lint + run: npm run lint diff --git a/package-lock.json b/package-lock.json index a9575f9..86972c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,6 +32,9 @@ "eslint-plugin-react": "^7.33.2", "redux-mock-store": "^1.5.4", "sass": "^1.71.0" + }, + "engines": { + "node": "20.12.2" } }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/package.json b/package.json index 2fc96d0..8524b0d 100644 --- a/package.json +++ b/package.json @@ -53,5 +53,8 @@ "eslint-plugin-react": "^7.33.2", "redux-mock-store": "^1.5.4", "sass": "^1.71.0" + }, + "engines": { + "node": "20.12.2" } }