From ccf66342c19715240141e31407f07d20cbc3ffea Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Sat, 23 Sep 2023 17:06:12 -0300 Subject: [PATCH] ci adjusts --- .github/workflows/test-integration-jwt.yml | 14 ++++++++++++-- .../workflows/test-integration-microservice.yml | 14 ++++++++++++-- .github/workflows/test-integration-oauth.yml | 14 ++++++++++++-- test-integration/scripts/02-generate-app-sample.sh | 2 +- .../scripts/04-generate-entities-sample.sh | 2 +- 5 files changed, 38 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-integration-jwt.yml b/.github/workflows/test-integration-jwt.yml index 194b7bce4..9343b8857 100644 --- a/.github/workflows/test-integration-jwt.yml +++ b/.github/workflows/test-integration-jwt.yml @@ -12,10 +12,13 @@ jobs: runs-on: ${{ matrix.os }} if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" timeout-minutes: 40 + defaults: + run: + working-directory: ${{ github.workspace }}/app strategy: fail-fast: false matrix: - node_version: [16.14.0] + node_version: [18] os: [ubuntu-20.04] app-type: - jwt-with-angular-app @@ -58,9 +61,15 @@ jobs: steps: - uses: actions/checkout@v3 + with: + path: jhipster-dotnetcore + fetch-depth: 2 - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node_version }} + - name: Create app dir + working-directory: ${{ github.workspace }} + run: mkdir app - name: 'install required npm version' run: npm install -g npm@$(node -e "console.log(require('./generators/generator-dotnetcore-constants.cjs').NPM_VERSION);") - uses: joschi/setup-jdk@v2 @@ -73,7 +82,8 @@ jobs: - 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 - name: PREPARE jhipster env - run: sudo ./test-integration/scripts/00-install-all-jhipster.sh + working-directory: ${{ github.workspace }}/jhipster-dotnetcore + run: npm ci && npm link - name: 'GENERATE JHipster.NET app' run: ./test-integration/scripts/02-generate-app-sample.sh $JHI_APP - name: 'INSTALL AND BUILD DEPENDENCIES of generated app' diff --git a/.github/workflows/test-integration-microservice.yml b/.github/workflows/test-integration-microservice.yml index 31789553a..cfbe39da4 100644 --- a/.github/workflows/test-integration-microservice.yml +++ b/.github/workflows/test-integration-microservice.yml @@ -12,10 +12,13 @@ jobs: runs-on: ${{ matrix.os }} if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" timeout-minutes: 40 + defaults: + run: + working-directory: ${{ github.workspace }}/app strategy: fail-fast: false matrix: - node_version: [16.14.0] + node_version: [18] os: [ubuntu-20.04] app-type: - microservice-app @@ -31,9 +34,15 @@ jobs: steps: - uses: actions/checkout@v3 + with: + path: jhipster-dotnetcore + fetch-depth: 2 - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node_version }} + - name: Create app dir + working-directory: ${{ github.workspace }} + run: mkdir app - name: 'install required npm version' run: npm install -g npm@$(node -e "console.log(require('./generators/generator-dotnetcore-constants.cjs').NPM_VERSION);") - uses: actions/setup-dotnet@v3 @@ -42,7 +51,8 @@ jobs: - 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 - name: PREPARE jhipster env - run: sudo ./test-integration/scripts/00-install-all-jhipster.sh + working-directory: ${{ github.workspace }}/jhipster-dotnetcore + run: npm ci && npm link - name: 'GENERATE JHipster.NET app' run: ./test-integration/scripts/02-generate-app-sample.sh $JHI_APP - name: 'INSTALL AND BUILD DEPENDENCIES of generated app' diff --git a/.github/workflows/test-integration-oauth.yml b/.github/workflows/test-integration-oauth.yml index 6ef79a511..a352ba1e3 100644 --- a/.github/workflows/test-integration-oauth.yml +++ b/.github/workflows/test-integration-oauth.yml @@ -12,10 +12,13 @@ jobs: runs-on: ${{ matrix.os }} if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" timeout-minutes: 40 + defaults: + run: + working-directory: ${{ github.workspace }}/app strategy: fail-fast: false matrix: - node_version: [16.14.0] + node_version: [18] os: [ubuntu-20.04] app-type: - oauth-with-angular-app @@ -55,9 +58,15 @@ jobs: steps: - uses: actions/checkout@v3 + with: + path: jhipster-dotnetcore + fetch-depth: 2 - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node_version }} + - name: Create app dir + working-directory: ${{ github.workspace }} + run: mkdir app - name: 'install required npm version' run: npm install -g npm@$(node -e "console.log(require('./generators/generator-dotnetcore-constants.cjs').NPM_VERSION);") - uses: actions/setup-dotnet@v3 @@ -66,7 +75,8 @@ jobs: - 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 - name: PREPARE jhipster env - run: sudo ./test-integration/scripts/00-install-all-jhipster.sh + working-directory: ${{ github.workspace }}/jhipster-dotnetcore + run: npm ci && npm link - name: 'GENERATE JHipster.NET app' run: ./test-integration/scripts/02-generate-app-sample.sh $JHI_APP $JHI_ARG - name: 'INSTALL AND BUILD DEPENDENCIES of generated app' diff --git a/test-integration/scripts/02-generate-app-sample.sh b/test-integration/scripts/02-generate-app-sample.sh index faab490d0..9536d793d 100755 --- a/test-integration/scripts/02-generate-app-sample.sh +++ b/test-integration/scripts/02-generate-app-sample.sh @@ -14,7 +14,7 @@ echo "*** run generation app with dotnetcore blueprint for : "$APP_FOLDER runOptions="--blueprints dotnetcore --skip-checks --force --no-insight --skip-install" -jhipster $runOptions +jhipster-dotnetcore $runOptions echo "*** check if the generation is ok for csharp classes :" diff --git a/test-integration/scripts/04-generate-entities-sample.sh b/test-integration/scripts/04-generate-entities-sample.sh index 256dfdb5c..f338f7551 100755 --- a/test-integration/scripts/04-generate-entities-sample.sh +++ b/test-integration/scripts/04-generate-entities-sample.sh @@ -19,7 +19,7 @@ if [[ "$2" = "import-jdl" ]]; then else runOptions="import-jdl ../jdl-default/app.jdl $runOptions" fi - jhipster $runOptions + jhipster-dotnetcore $runOptions # copy files required for testing automatic service class/interface registration on dependency injection container if [[ -n $(find src/JhipsterSampleApplication.Domain.Services -type f -name "*CountryService.cs") ]]; then