Skip to content

Commit

Permalink
Merge pull request #3 from jhipster/main
Browse files Browse the repository at this point in the history
Merge Request from upstream
  • Loading branch information
amatosg authored Oct 30, 2023
2 parents f929728 + e68a3a4 commit fad5e35
Show file tree
Hide file tree
Showing 122 changed files with 2,798 additions and 2,222 deletions.
25 changes: 8 additions & 17 deletions .github/workflows/angular.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,43 +100,34 @@ jobs:
jdl-sample: ${{ matrix.setup-jdl-sample }}
application-environment: ${{ matrix.setup-application-environment }}
application-packaging: ${{ matrix.setup-application-packaging }}
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ steps.setup.outputs.node-version }}
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ steps.setup.outputs.java-version }}
- name: 'SETUP: load npm cache'
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: |
~/.npm
~/.cache/Cypress/
key: ${{ runner.os }}-node-${{ steps.setup.outputs.date }}-${{ matrix.npm-cache || 'angular' }}-${{ hashFiles('generator-jhipster/package-lock.json', 'generator-jhipster/**/package.json') }}
restore-keys: |
${{ runner.os }}-node-${{ steps.setup.outputs.date }}-${{ matrix.npm-cache || 'angular' }}-
${{ runner.os }}-node-${{ steps.setup.outputs.date }}-
${{ runner.os }}-node-${{ steps.setup.outputs.date }}
key: ${{ runner.os }}-node-

- name: 'SETUP: load maven cache'
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ steps.setup.outputs.date }}-${{ hashFiles('generator-jhipster/**/pom.xml.ejs') }}
restore-keys: |
${{ runner.os }}-maven-${{ steps.setup.outputs.date }}-
${{ runner.os }}-maven-${{ steps.setup.outputs.date }}
key: ${{ runner.os }}-maven-
- name: 'SETUP: load gradle cache'
if: matrix.workspaces == 'true' || matrix.gradle == 1 || contains(matrix.name, 'gradle')
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ steps.setup.outputs.date }}-${{ hashFiles('generator-jhipster/**/build.gradle.ejs') }}
restore-keys: |
${{ runner.os }}-gradle-${{ steps.setup.outputs.date }}-
${{ runner.os }}-gradle-${{ steps.setup.outputs.date }}
key: ${{ runner.os }}-gradle-
- name: 'TOOLS: configure tools installed by the system'
run: $JHI_SCRIPTS/03-system.sh
- name: 'TOOLS: configure git'
Expand Down
61 changes: 33 additions & 28 deletions .github/workflows/cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,32 +45,13 @@ jobs:
with:
jdl-sample: cache
generator-jhipster-branch: local
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ steps.setup.outputs.node-version }}
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ steps.setup.outputs.java-version }}
- name: 'SETUP: load npm cache'
uses: actions/cache@v3
with:
path: |
~/.npm
~/.cache/Cypress/
key: ${{ runner.os }}-node-${{ steps.setup.outputs.date }}${{ github.event.inputs.key }}
- name: 'SETUP: load maven cache'
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ steps.setup.outputs.date }}${{ github.event.inputs.key }}
- name: 'SETUP: load gradle cache'
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ steps.setup.outputs.date }}${{ github.event.inputs.key }}

# generator-jhipster npm
- name: 'Install generator-jhipster npm version'
Expand All @@ -87,25 +68,25 @@ jobs:
- name: Cache common node_modules
run: npm install
continue-on-error: true
working-directory: ${{ github.workspace }}/generator-jhipster/generators/common/templates/
working-directory: ${{ github.workspace }}/generator-jhipster/generators/common/resources
- name: Cache angular node_modules
run: npm install --force
continue-on-error: true
working-directory: ${{ github.workspace }}/generator-jhipster/generators/angular/templates
working-directory: ${{ github.workspace }}/generator-jhipster/generators/angular/resources
- name: Cache client common node_modules
run: |
npm install --force
npx cypress install
continue-on-error: true
working-directory: ${{ github.workspace }}/generator-jhipster/generators/client/templates
working-directory: ${{ github.workspace }}/generator-jhipster/generators/client/resources
- name: Cache react node_modules
run: npm install --force
continue-on-error: true
working-directory: ${{ github.workspace }}/generator-jhipster/generators/react/templates
working-directory: ${{ github.workspace }}/generator-jhipster/generators/react/resources
- name: Cache vue node_modules
run: npm install
run: npm install --force
continue-on-error: true
working-directory: ${{ github.workspace }}/generator-jhipster/generators/vue/templates
working-directory: ${{ github.workspace }}/generator-jhipster/generators/vue/resources

- name: 'mvn: install JHipster'
run: $JHI_SCRIPTS/10-install-jhipster.sh
Expand All @@ -120,7 +101,9 @@ jobs:
$JHI_SCRIPTS/12-generate-project.sh --skip-install --workspaces
npm install --force
npm run backend:build-cache || true
cd ..
cd app1
./npmw -v
cd ../..
rm -rf app
mkdir app
continue-on-error: true
Expand Down Expand Up @@ -148,7 +131,9 @@ jobs:
$JHI_SCRIPTS/12-generate-project.sh --skip-install --workspaces --build gradle
npm install --force
npm run backend:build-cache || true
cd ..
cd app1
./npmw -v
cd ../..
rm -rf app
mkdir app
continue-on-error: true
Expand All @@ -166,3 +151,23 @@ jobs:
rm -rf app
mkdir app
continue-on-error: true

- name: 'save npm cache'
uses: actions/cache/save@v3
with:
path: |
~/.npm
~/.cache/Cypress/
key: ${{ runner.os }}-node-${{ steps.setup.outputs.date }}${{ github.event.inputs.key }}
- name: 'save maven cache'
uses: actions/cache/save@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ steps.setup.outputs.date }}${{ github.event.inputs.key }}
- name: 'save gradle cache'
uses: actions/cache/save@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ steps.setup.outputs.date }}${{ github.event.inputs.key }}
27 changes: 9 additions & 18 deletions .github/workflows/devserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,43 +79,34 @@ jobs:
jdl-sample: ${{ matrix.setup-jdl-sample }}
application-environment: ${{ matrix.setup-application-environment }}
application-packaging: ${{ matrix.setup-application-packaging }}
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ steps.setup.outputs.node-version }}
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ steps.setup.outputs.java-version }}
- name: 'SETUP: load npm cache'
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: |
~/.npm
~/.cache/Cypress/
key: ${{ runner.os }}-node-${{ steps.setup.outputs.date }}-${{ matrix.cache }}-${{ hashFiles('generator-jhipster/package-lock.json', 'generator-jhipster/**/package.json') }}
restore-keys: |
${{ runner.os }}-node-${{ steps.setup.outputs.date }}-${{ matrix.cache }}-
${{ runner.os }}-node-${{ steps.setup.outputs.date }}-
${{ runner.os }}-node-${{ steps.setup.outputs.date }}
key: ${{ runner.os }}-node-

- name: 'SETUP: load maven cache'
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ steps.setup.outputs.date }}-${{ hashFiles('generator-jhipster/**/pom.xml.ejs') }}
restore-keys: |
${{ runner.os }}-maven-${{ steps.setup.outputs.date }}-
${{ runner.os }}-maven-${{ steps.setup.outputs.date }}
key: ${{ runner.os }}-maven-
- name: 'SETUP: load gradle cache'
if: contains(matrix.app-sample, 'gradle')
uses: actions/cache@v3
if: matrix.workspaces == 'true' || matrix.gradle == 1 || contains(matrix.app-sample, 'gradle')
uses: actions/cache/restore@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ steps.setup.outputs.date }}-${{ hashFiles('generator-jhipster/**/build.gradle.ejs') }}
restore-keys: |
${{ runner.os }}-gradle-${{ steps.setup.outputs.date }}-
${{ runner.os }}-gradle-${{ steps.setup.outputs.date }}
key: ${{ runner.os }}-gradle-
- name: 'TOOLS: configure tools installed by the system'
run: $JHI_SCRIPTS/03-system.sh
- name: 'TOOLS: configure git'
Expand Down
25 changes: 8 additions & 17 deletions .github/workflows/generator-database-changelog-liquibase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,43 +62,34 @@ jobs:
entities-sample: ${{ matrix.entity }}
application-environment: ${{ matrix.environment }}
application-packaging: ${{ (matrix.war == 1 && 'war') || 'jar' }}
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ steps.setup.outputs.node-version }}
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ steps.setup.outputs.java-version }}
- name: 'SETUP: load npm cache'
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: |
~/.npm
~/.cache/Cypress/
key: ${{ runner.os }}-node-${{ steps.setup.outputs.date }}-angular-${{ hashFiles('generator-jhipster/package-lock.json', 'generator-jhipster/**/package.json') }}
restore-keys: |
${{ runner.os }}-node-${{ steps.setup.outputs.date }}-angular-
${{ runner.os }}-node-${{ steps.setup.outputs.date }}-
${{ runner.os }}-node-${{ steps.setup.outputs.date }}
key: ${{ runner.os }}-node-

- name: 'SETUP: load maven cache'
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ steps.setup.outputs.date }}-${{ hashFiles('generator-jhipster/**/pom.xml.ejs') }}
restore-keys: |
${{ runner.os }}-maven-${{ steps.setup.outputs.date }}-
${{ runner.os }}-maven-${{ steps.setup.outputs.date }}
key: ${{ runner.os }}-maven-
- name: 'SETUP: load gradle cache'
if: contains(matrix.app-type, 'gradle')
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ steps.setup.outputs.date }}-${{ hashFiles('generator-jhipster/**/build.gradle.ejs') }}
restore-keys: |
${{ runner.os }}-gradle-${{ steps.setup.outputs.date }}-
${{ runner.os }}-gradle-${{ steps.setup.outputs.date }}
key: ${{ runner.os }}-gradle-
- name: 'TOOLS: configure tools installed by the system'
run: $JHI_SCRIPTS/03-system.sh
- name: 'TOOLS: configure git'
Expand Down
19 changes: 6 additions & 13 deletions .github/workflows/generator-generate-blueprint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,32 +48,26 @@ jobs:
with:
application-sample: ng-default
executable: jhipster-foo
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ steps.setup.outputs.node-version }}
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ steps.setup.outputs.java-version }}
- name: 'SETUP: load npm cache'
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: |
~/.npm
~/.cache/Cypress/
key: ${{ runner.os }}-node-${{ steps.setup.outputs.date }}-generate-blueprint
restore-keys: |
${{ runner.os }}-node-${{ steps.setup.outputs.date }}-generate-blueprint
${{ runner.os }}-node-${{ steps.setup.outputs.date }}-
${{ runner.os }}-node-${{ steps.setup.outputs.date }}
key: ${{ runner.os }}-node-

- name: 'SETUP: load maven cache'
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ steps.setup.outputs.date }}-${{ hashFiles('generator-jhipster/**/pom.xml.ejs') }}
restore-keys: |
${{ runner.os }}-maven-${{ steps.setup.outputs.date }}-
${{ runner.os }}-maven-${{ steps.setup.outputs.date }}
key: ${{ runner.os }}-maven-
- name: 'TOOLS: configure tools installed by the system'
run: $JHI_SCRIPTS/03-system.sh
- name: 'TOOLS: configure git'
Expand Down Expand Up @@ -105,7 +99,6 @@ jobs:
#----------------------------------------------------------------------
- name: 'TESTS: blueprint files should be written'
run: |
ls template-file-app
ls template-file-client
ls template-file-common
ls template-file-cypress
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,16 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18.18.2
- name: 'SETUP: load npm cache'
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: |
~/.npm
~/.cache/Cypress/
key: ${{ runner.os }}-node-${{ steps.get-date.outputs.date }}-${{ hashFiles('generator-jhipster/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ steps.get-date.outputs.date }}-
${{ runner.os }}-node-${{ steps.get-date.outputs.date }}
key: ${{ runner.os }}-node-
- name: 'install required npm version'
run: npm install -g npm@$(node -e "console.log(require('./generators/common/resources/package.json').devDependencies.npm);")
- 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
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/issue-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- name: 'SETUP: environment'
id: setup
uses: ./generator-jhipster/.github/actions/setup
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ steps.setup.outputs.node-version }}
- uses: actions/setup-java@v3
Expand All @@ -74,19 +74,19 @@ jobs:
path: |
~/.npm
~/.cache/Cypress/
key: ${{ runner.os }}-node-${{ steps.setup.outputs.date }}
key: ${{ runner.os }}-node-
- name: 'SETUP: load maven cache'
uses: actions/cache/restore@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ steps.setup.outputs.date }}
key: ${{ runner.os }}-maven-
- name: 'SETUP: load gradle cache'
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ steps.setup.outputs.date }}
key: ${{ runner.os }}-gradle-
- name: 'TOOLS: configure tools installed by the system'
run: $JHI_SCRIPTS/03-system.sh
- name: 'TOOLS: configure git'
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/lock-maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,18 @@ jobs:
if: github.repository == 'jhipster/generator-jhipster'
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
- run: npm install -g npm@latest
- uses: actions/checkout@v4
- uses: actions/cache@v3
- name: 'SETUP: load npm cache'
uses: actions/cache/restore@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-
restore-keys: |
${{ runner.os }}-node-
path: |
~/.npm
~/.cache/Cypress/
key: ${{ runner.os }}-node-
- name: Create commit
run: |
rm package-lock.json
Expand Down
Loading

0 comments on commit fad5e35

Please sign in to comment.