Skip to content

Commit

Permalink
Bump node version to 22.x
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-va committed Jul 22, 2024
1 parent 75b61bb commit 2adc87e
Show file tree
Hide file tree
Showing 5 changed files with 3,457 additions and 5,230 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- "!main"

env:
NODE_VERSION: "20.x"
NODE_VERSION: "22.x"
DB_USERNAME: postgres
DB_PASSWORD: postgres
DB_DATABASE: postgres
Expand Down Expand Up @@ -39,25 +39,25 @@ jobs:
uses: actions/cache@v4
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: "${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}"
key: "${{ runner.os }}-npm-${{ env.NODE_VERSION }}-${{ hashFiles('package-lock.json') }}"
restore-keys: |
${{ runner.os }}-npm-
- name: Cache node modules
uses: actions/cache@v4
with:
path: ./node_modules
key: "${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }}-${{ hashFiles('**/schema.prisma') }}"
key: "${{ runner.os }}-node_modules-${{ env.NODE_VERSION }}-${{ hashFiles('package-lock.json') }}-${{ hashFiles('**/schema.prisma') }}"
restore-keys: |
${{ runner.os }}-node_modules-
- name: Cache e2e node modules
uses: actions/cache@v4
with:
path: ./e2e/node_modules
key: "${{ runner.os }}-node_modules_e2e-${{ hashFiles('./e2e/package-lock.json') }}"
key: "${{ runner.os }}-node_modules_e2e-${{ env.NODE_VERSION }}-${{ hashFiles('./e2e/package-lock.json') }}"
restore-keys: |
${{ runner.os }}-node_modules_e2e-
- name: Install node dependencies
run: npm ci
run: npm install
- name: Generate prisma types
run: npm run prisma -- generate
- name: Install e2e node dependencies
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
uses: actions/cache/restore@v4
with:
path: ./node_modules
key: "${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }}-${{ hashFiles('**/schema.prisma') }}"
key: "${{ runner.os }}-node_modules-${{ env.NODE_VERSION }}-${{ hashFiles('package-lock.json') }}-${{ hashFiles('**/schema.prisma') }}"
- name: Migrate database
run: npm run prisma -- migrate deploy
- name: Run tests
Expand All @@ -116,7 +116,7 @@ jobs:
uses: actions/cache/restore@v4
with:
path: ./node_modules
key: "${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }}-${{ hashFiles('**/schema.prisma') }}"
key: "${{ runner.os }}-node_modules-${{ env.NODE_VERSION }}-${{ hashFiles('package-lock.json') }}-${{ hashFiles('**/schema.prisma') }}"
- name: Run lint
run: npm run lint
- name: Run prettier
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
uses: actions/cache/restore@v4
with:
path: ./node_modules
key: "${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }}-${{ hashFiles('**/schema.prisma') }}"
key: "${{ runner.os }}-node_modules-${{ env.NODE_VERSION }}-${{ hashFiles('package-lock.json') }}-${{ hashFiles('**/schema.prisma') }}"
- name: Reset nx
run: npx nx reset
- name: Run build
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
# uses: actions/cache/restore@v4
# with:
# path: ./node_modules
# key: "${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }}-${{ hashFiles('**/schema.prisma') }}"
# key: "${{ runner.os }}-node_modules-${{ env.NODE_VERSION }}-${{ hashFiles('package-lock.json') }}-${{ hashFiles('**/schema.prisma') }}"
# - name: Start services
# env:
# DB_USER: ${{ env.DB_USERNAME }}
Expand All @@ -190,7 +190,7 @@ jobs:
# uses: actions/cache/restore@v4
# with:
# path: ./e2e/node_modules
# key: "${{ runner.os }}-node_modules_e2e-${{ hashFiles('./e2e/package-lock.json') }}"
# key: "${{ runner.os }}-node_modules_e2e-${{ env.NODE_VERSION }}-${{ hashFiles('./e2e/package-lock.json') }}"
# - name: Cypress run
# uses: cypress-io/github-action@v6
# with:
Expand Down
2 changes: 1 addition & 1 deletion apps/client-asset-sg/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20-alpine as app-builder
FROM node:22-alpine as app-builder

ARG APP_VERSION
ENV APP_VERSION=${APP_VERSION}
Expand Down
4 changes: 2 additions & 2 deletions apps/server-asset-sg/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG APP_VERSION

FROM node:20-alpine as api-builder
FROM node:22-alpine as api-builder

ENV APP_VERSION=${APP_VERSION}
ENV NODE_ENV=development
Expand All @@ -12,7 +12,7 @@ RUN npm install && ./node_modules/.bin/prisma generate
RUN npx nx build server-asset-sg --configuration=production

# final image build
FROM node:20-alpine
FROM node:22-alpine

ENV APP_VERSION=${APP_VERSION}
ENV NODE_ENV=production
Expand Down
Loading

0 comments on commit 2adc87e

Please sign in to comment.