Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Nest to v8 #557

Merged
merged 8 commits into from
Nov 10, 2024
Merged
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
42 changes: 0 additions & 42 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,48 +18,6 @@ updates:
- '@types/jest'
- 'jest'
- 'ts-jest'
nestjs:
update-types:
- 'minor'
- 'patch'
patterns:
- '@nestjs/common'
- '@nestjs/core'
- '@nestjs/microservices'
- '@nestjs/platform-express'
- '@nestjs/platform-fastify'
- '@nestjs/platform-socket.io'
- '@nestjs/platform-ws'
- '@nestjs/testing'
- '@nestjs/websockets'
- 'rxjs'
passport:
update-types:
- 'minor'
- 'patch'
patterns:
- '@nestjs/passport'
- '@types/jwt-decode'
- '@types/passport-jwt'
- 'jwt-decode'
- 'passport'
- 'passport-jwt'
- 'passport-oauth2'
typeorm:
update-types:
- 'minor'
- 'patch'
patterns:
- '@nestjs/typeorm'
- 'typeorm'
- 'typeorm-encrypted'
- 'mongodb'
- 'mongodb-memory-server'
- 'mssql'
- 'mysql2'
- 'oracledb'
- 'pg'
- 'sqlite3'
typescript-eslint:
patterns:
- '@typescript-eslint/*'
2 changes: 1 addition & 1 deletion .github/workflows/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'npm'
- run: npm ci
- run: npm run test
Expand Down
41 changes: 26 additions & 15 deletions .github/workflows/test-integration-angular.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: Test Integration Angular
on:
push:
branches-ignore:
- 'dependabot/**'
branches:
- 'main'
pull_request:
branches:
- '*'
permissions:
contents: read
env:
NODE_OPTIONS: --dns-result-order=ipv4first
FORCE_COLOR: 2
jobs:
applications:
name: ${{ matrix.app-type }}
Expand Down Expand Up @@ -40,7 +43,7 @@ jobs:
- app-type: monolith-angular-jwt-mongodb-jdl
app-folder: monolith-angular-auth-mongodb-template-jdl
entity: import-jdl
e2e: jwt
e2e: 'false'
- app-type: monolith-angular-jwt-i18n-jdl
app-folder: monolith-client-auth-i18n-template-jdl
entity: import-jdl
Expand All @@ -52,7 +55,7 @@ jobs:
- app-type: monolith-angular-oauth2-mongodb-jdl
app-folder: monolith-angular-auth-mongodb-template-jdl
entity: import-jdl
e2e: oauth2
e2e: 'false'
- app-type: monolith-angular-oauth2-i18n-jdl
app-folder: monolith-client-auth-i18n-template-jdl
entity: import-jdl
Expand All @@ -79,31 +82,39 @@ jobs:
- uses: actions/checkout@v4
with:
path: generator-jhipster-nodejs
- uses: actions/setup-node@v4
fetch-depth: 2
- uses: jhipster/actions/setup-runner@v0
with:
node-version: ${{ matrix.node-version }}
- run: mkdir ${{ github.workspace }}/app
binary-dir: ${{ github.workspace }}/generator-jhipster-nodejs/cli/
- run: npm install
working-directory: ${{ github.workspace }}/generator-jhipster-nodejs
- name: GIT HISTORY
run: git --no-pager log -n 10 --graph --pretty='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue) <%an>%Creset' --abbrev-commit
working-directory: ${{ github.workspace }}/generator-jhipster-nodejs
- name: Link blueprint
run: npm install && npm link
working-directory: ${{ github.workspace }}/generator-jhipster-nodejs
- name: 'GENERATE NHipster app'
run: nhipster generate-sample $NHI_APP_FOLDER --template-name $NHI_APP
- run: cli.cjs generate-sample $NHI_APP_FOLDER --template-name $NHI_APP --skip-jhipster-dependencies --skip-install
- uses: jhipster/actions/compare-sample@v0
id: compare
if: >-
github.event.pull_request &&
!contains(github.event.pull_request.labels.*.name, 'pr: disable-compare')
with:
generator-path: generator-jhipster-nodejs
cmd: cli.cjs generate-sample $NHI_APP_FOLDER --template-name $NHI_APP --skip-jhipster-dependencies --skip-install
- name: 'INSTALL DEPENDENCIES of generated app'
run: npm install
if: steps.compare.outputs.equals != 'true'
- name: 'RUN UNIT TESTS of generated app'
run: npm test --workspaces
if: steps.compare.outputs.equals != 'true'
- name: 'RUN SERVER E2E TESTS of generated app'
run: npm run test:server:e2e
if: steps.compare.outputs.equals != 'true'
- name: 'BUILD AND RUN SERVER APP'
run: npm run app:up
if: steps.compare.outputs.equals != 'true'
- name: 'START APP WITH EVENTUAL CLIENT E2E TESTS'
run: npm run e2e:headless --workspace client
if: matrix.e2e != 'false' && steps.compare.outputs.equals != 'true'
id: e2e
- name: 'E2E: Store failure screenshots'
- name: Store cypress screenshots
uses: actions/upload-artifact@v4
if: always() && steps.e2e.outcome == 'failure'
with:
Expand Down
33 changes: 21 additions & 12 deletions .github/workflows/test-integration-microservice.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: Test Integration Microservice
on:
push:
branches-ignore:
- 'dependabot/**'
branches:
- 'main'
pull_request:
branches:
- '*'
permissions:
contents: read
env:
NODE_OPTIONS: --dns-result-order=ipv4first
FORCE_COLOR: 2
jobs:
applications:
name: ${{ matrix.app-type }}
Expand Down Expand Up @@ -39,25 +42,31 @@ jobs:
- uses: actions/checkout@v4
with:
path: generator-jhipster-nodejs
- uses: actions/setup-node@v4
fetch-depth: 2
- uses: jhipster/actions/setup-runner@v0
with:
node-version: ${{ matrix.node-version }}
- run: mkdir ${{ github.workspace }}/app
working-directory: ${{ github.workspace }}/generator-jhipster-nodejs
- name: GIT HISTORY
run: git --no-pager log -n 10 --graph --pretty='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue) <%an>%Creset' --abbrev-commit
binary-dir: ${{ github.workspace }}/generator-jhipster-nodejs/cli/
- run: npm install
working-directory: ${{ github.workspace }}/generator-jhipster-nodejs
- name: Link blueprint
run: npm install && npm link
working-directory: ${{ github.workspace }}/generator-jhipster-nodejs
- name: 'GENERATE NHipster app'
run: nhipster generate-sample $NHI_APP_FOLDER --template-name $NHI_APP
- run: cli.cjs generate-sample $NHI_APP_FOLDER --template-name $NHI_APP --skip-jhipster-dependencies --skip-install
- uses: jhipster/actions/compare-sample@v0
id: compare
if: >-
github.event.pull_request &&
!contains(github.event.pull_request.labels.*.name, 'pr: disable-compare')
with:
generator-path: generator-jhipster-nodejs
cmd: cli.cjs generate-sample $NHI_APP_FOLDER --template-name $NHI_APP --skip-jhipster-dependencies --skip-install
- name: 'INSTALL DEPENDENCIES of generated app'
run: npm install
if: steps.compare.outputs.equals != 'true'
- name: 'RUN UNIT TESTS of generated app'
run: npm test --workspaces
if: steps.compare.outputs.equals != 'true'
- name: 'RUN SERVER E2E TESTS of generated app'
run: npm run test:server:e2e
if: steps.compare.outputs.equals != 'true'
check-microservice-applications:
permissions:
contents: none
Expand Down
39 changes: 25 additions & 14 deletions .github/workflows/test-integration-react.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: Test Integration React
on:
push:
branches-ignore:
- 'dependabot/**'
branches:
- 'main'
pull_request:
branches:
- '*'
permissions:
contents: read
env:
NODE_OPTIONS: --dns-result-order=ipv4first
FORCE_COLOR: 2
jobs:
applications:
name: ${{ matrix.app-type }}
Expand Down Expand Up @@ -54,7 +57,7 @@ jobs:
- app-type: monolith-react-mongodb-prod-jdl
app-folder: monolith-client-database-prod-template-jdl
entity: import-jdl
e2e: jwt
e2e: 'false'
- app-type: monolith-react-oauth2-dev
app-folder: monolith-react-oauth2-dev
entity: 'no'
Expand All @@ -69,31 +72,39 @@ jobs:
- uses: actions/checkout@v4
with:
path: generator-jhipster-nodejs
- uses: actions/setup-node@v4
fetch-depth: 2
- uses: jhipster/actions/setup-runner@v0
with:
node-version: ${{ matrix.node-version }}
- run: mkdir ${{ github.workspace }}/app
working-directory: ${{ github.workspace }}/generator-jhipster-nodejs
- name: GIT HISTORY
run: git --no-pager log -n 10 --graph --pretty='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue) <%an>%Creset' --abbrev-commit
binary-dir: ${{ github.workspace }}/generator-jhipster-nodejs/cli/
- run: npm install
working-directory: ${{ github.workspace }}/generator-jhipster-nodejs
- name: Link blueprint
run: npm install && npm link
working-directory: ${{ github.workspace }}/generator-jhipster-nodejs
- name: 'GENERATE NHipster app'
run: nhipster generate-sample $NHI_APP_FOLDER --template-name $NHI_APP
- run: cli.cjs generate-sample $NHI_APP_FOLDER --template-name $NHI_APP --skip-jhipster-dependencies --skip-install
- uses: jhipster/actions/compare-sample@v0
id: compare
if: >-
github.event.pull_request &&
!contains(github.event.pull_request.labels.*.name, 'pr: disable-compare')
with:
generator-path: generator-jhipster-nodejs
cmd: cli.cjs generate-sample $NHI_APP_FOLDER --template-name $NHI_APP --skip-jhipster-dependencies --skip-install
- name: 'INSTALL DEPENDENCIES of generated app'
run: npm install
if: steps.compare.outputs.equals != 'true'
- name: 'RUN UNIT TESTS of generated app'
run: npm test --workspaces
if: steps.compare.outputs.equals != 'true'
- name: 'RUN SERVER E2E TESTS of generated app'
run: npm run test:server:e2e
if: steps.compare.outputs.equals != 'true'
- name: 'BUILD AND RUN SERVER APP'
run: npm run app:up
if: steps.compare.outputs.equals != 'true'
- name: 'START APP WITH EVENTUAL CLIENT E2E TESTS'
run: npm run e2e:headless --workspace client
if: matrix.e2e != 'false' && steps.compare.outputs.equals != 'true'
id: e2e
- name: 'E2E: Store failure screenshots'
- name: Store cypress screenshots
uses: actions/upload-artifact@v4
if: always() && steps.e2e.outcome == 'failure'
with:
Expand Down
39 changes: 25 additions & 14 deletions .github/workflows/test-integration-vue.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: Test Integration Vue
on:
push:
branches-ignore:
- 'dependabot/**'
branches:
- 'main'
pull_request:
branches:
- '*'
permissions:
contents: read
env:
NODE_OPTIONS: --dns-result-order=ipv4first
FORCE_COLOR: 2
jobs:
applications:
name: ${{ matrix.app-type }}
Expand Down Expand Up @@ -38,7 +41,7 @@ jobs:
- app-type: monolith-vue-mongodb-prod-jdl
app-folder: monolith-client-database-prod-template-jdl
entity: import-jdl
e2e: jwt
e2e: 'false'
env:
NHI_APP: ${{ matrix.app-type }}
NHI_APP_FOLDER: ${{ matrix.app-folder }}
Expand All @@ -49,31 +52,39 @@ jobs:
- uses: actions/checkout@v4
with:
path: generator-jhipster-nodejs
- uses: actions/setup-node@v4
fetch-depth: 2
- uses: jhipster/actions/setup-runner@v0
with:
node-version: ${{ matrix.node-version }}
- run: mkdir ${{ github.workspace }}/app
working-directory: ${{ github.workspace }}/generator-jhipster-nodejs
- name: GIT HISTORY
run: git --no-pager log -n 10 --graph --pretty='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue) <%an>%Creset' --abbrev-commit
binary-dir: ${{ github.workspace }}/generator-jhipster-nodejs/cli/
- run: npm install
working-directory: ${{ github.workspace }}/generator-jhipster-nodejs
- name: Link blueprint
run: npm install && npm link
working-directory: ${{ github.workspace }}/generator-jhipster-nodejs
- name: 'GENERATE NHipster app'
run: nhipster generate-sample $NHI_APP_FOLDER --template-name $NHI_APP
- run: cli.cjs generate-sample $NHI_APP_FOLDER --template-name $NHI_APP --skip-jhipster-dependencies --skip-install
- uses: jhipster/actions/compare-sample@v0
id: compare
if: >-
github.event.pull_request &&
!contains(github.event.pull_request.labels.*.name, 'pr: disable-compare')
with:
generator-path: generator-jhipster-nodejs
cmd: cli.cjs generate-sample $NHI_APP_FOLDER --template-name $NHI_APP --skip-jhipster-dependencies --skip-install
- name: 'INSTALL DEPENDENCIES of generated app'
run: npm install
if: steps.compare.outputs.equals != 'true'
- name: 'RUN UNIT TESTS of generated app'
run: npm test --workspaces
if: steps.compare.outputs.equals != 'true'
- name: 'RUN SERVER E2E TESTS of generated app'
run: npm run test:server:e2e
if: steps.compare.outputs.equals != 'true'
- name: 'BUILD AND RUN SERVER APP'
run: npm run app:up
if: steps.compare.outputs.equals != 'true'
- name: 'START APP WITH EVENTUAL CLIENT E2E TESTS'
run: npm run e2e:headless --workspace client
if: matrix.e2e != 'false' && steps.compare.outputs.equals != 'true'
id: e2e
- name: 'E2E: Store failure screenshots'
- name: Store cypress screenshots
uses: actions/upload-artifact@v4
if: always() && steps.e2e.outcome == 'failure'
with:
Expand Down
5 changes: 5 additions & 0 deletions generators/docker/templates/docker/app.yml.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ services:
ports:
- <%= serverPort %>:<%= serverPort %>
<%_ } _%>
healthcheck:
test: ['CMD', 'nc', '-vz', '-w1', 'localhost', '<%= serverPort %>']
interval: 5s
timeout: 5s
retries: 10
Loading