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

Integrate WebFlux and jdl workflows and rework workflows for auto merge #18147

Merged
merged 7 commits into from
Mar 21, 2022
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
33 changes: 27 additions & 6 deletions .github/workflows/angular.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ jobs:
run: $JHI_SCRIPTS/03-system.sh
- name: 'TOOLS: configure git'
run: $JHI_SCRIPTS/04-git-config.sh
# Update global NPM for workspaces support
- name: 'Install required NPM version'
if: matrix.workspaces == 'true'
run: npm install -g npm@${{ steps.setup.outputs.npm-version }} || true
#----------------------------------------------------------------------
# Install JHipster and generate project+entities
#----------------------------------------------------------------------
Expand All @@ -150,7 +154,12 @@ jobs:
- name: 'GENERATION: config'
run: $JHI_SCRIPTS/11-generate-config.sh
- name: 'GENERATION: project'
run: $JHI_SCRIPTS/12-generate-project.sh --skip-jhipster-dependencies ${{ matrix.extra-args }} ${{ matrix.new-extra-args }}
run: $JHI_SCRIPTS/12-generate-project.sh --skip-jhipster-dependencies --skip-install ${{ matrix.extra-args }} ${{ matrix.new-extra-args }}
- name: 'GENERATION: workspace git'
if: matrix.workspaces == 'true'
run: |
git add .
git commit -m "Commit workspaces"
- name: 'GENERATION: jhipster info'
run: $JHI_SCRIPTS/14-jhipster-info.sh
#----------------------------------------------------------------------
Expand All @@ -175,8 +184,11 @@ jobs:
#----------------------------------------------------------------------
# Launch tests
#----------------------------------------------------------------------
- name: 'PREPARE: npm install'
if: steps.compare.outputs.equals != 'true'
run: ${{ (matrix.workspaces == 'true' && 'npm') || './npmw' }} install
- name: 'TESTS: Start docker-compose containers for e2e and backend tests'
if: steps.compare.outputs.equals != 'true' && matrix.testcontainers == 'false'
if: steps.compare.outputs.equals != 'true' && matrix.testcontainers == 'false' && matrix.workspaces != 'true'
run: npm run ci:e2e:prepare
- name: 'TESTS: backend'
id: backend
Expand All @@ -190,7 +202,7 @@ jobs:
if: steps.compare.outputs.equals != 'true'
run: npm run ci:e2e:package
- name: 'TESTS: Start docker-compose containers for e2e tests'
if: steps.compare.outputs.equals != 'true' && matrix.testcontainers != 'false'
if: steps.compare.outputs.equals != 'true' && (matrix.testcontainers != 'false' || matrix.workspaces == 'true')
run: npm run ci:e2e:prepare
- name: 'E2E: Run'
id: e2e
Expand All @@ -201,19 +213,28 @@ jobs:
if: always() && steps.backend.outcome == 'failure'
with:
name: log-${{ matrix.name }}
path: ${{ steps.setup.outputs.application-path }}/*/test-results/**/*.xml
path: ${{ steps.setup.outputs.application-path }}/**/test-results/**/*.xml
- name: 'E2E: Store failure screenshots'
uses: actions/upload-artifact@v2
if: always() && steps.e2e.outcome == 'failure'
with:
name: screenshots-${{ matrix.name }}
path: ${{ steps.setup.outputs.application-path }}/*/cypress/screenshots
path: ${{ steps.setup.outputs.application-path }}/**/cypress/screenshots
- name: Dump docker logs
if: always()
uses: jwalton/gh-docker-logs@v2
- name: 'ANALYSIS: Sonar analysis'
if: steps.compare.outputs.equals != 'true' && matrix.sonar-analyse != 'false'
if: steps.compare.outputs.equals != 'true' && matrix.sonar-analyse != 'false' && matrix.workspaces != 'true'
run: $JHI_SCRIPTS/25-sonar-analyze.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
check-angular:
runs-on: ubuntu-latest
needs: [applications]
if: >-
always() &&
(needs.applications.result == 'skipped' || needs.applications.result == 'success') &&
github.event.action != 'closed'
steps:
- run: echo '${{ toJSON(needs) }}'
9 changes: 9 additions & 0 deletions .github/workflows/devserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,12 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
check-dev-server:
runs-on: ubuntu-latest
needs: [applications]
if: >-
always() &&
(needs.applications.result == 'skipped' || needs.applications.result == 'success') &&
github.event.action != 'closed'
steps:
- run: echo '${{ toJSON(needs) }}'
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,11 @@
#

name: Incremental Changelog
concurrency:
# Group PRs by head_ref, push to main branch by commit id, and others branch by ref.
group: ${{ github.workflow }}-${{ github.head_ref || (github.ref == 'refs/heads/main' && github.sha) || github.ref }}
cancel-in-progress: true
on:
push:
branches-ignore:
- 'dependabot/**'
- 'skip_ci*'
pull_request:
types: [closed, opened, synchronize, reopened]
branches:
- '*'
paths:
- 'jdl/**'
- 'utils/**'
- 'test-integration/incremental-changelog-samples/**'
- 'generators/entity/**'
- 'generators/database-changelog/**'
- 'generators/database-changelog-liquibase/**'
on: [workflow_call]
jobs:
applications:
check-generator-database-changelog-liquibase:
name: ${{ matrix.app-type }}
runs-on: ${{ matrix.os }}
runs-on: ubuntu-20.04
defaults:
run:
working-directory: ${{ github.workspace }}/app
Expand All @@ -57,8 +38,6 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
cache: [angular]
app-type:
- liquibase-jdl-rename-field
include:
Expand All @@ -67,7 +46,6 @@ jobs:
liquibase: jdl
environment: prod
war: 0
e2e: 1
steps:
#----------------------------------------------------------------------
# Install all tools and check configuration
Expand Down Expand Up @@ -98,9 +76,9 @@ jobs:
path: |
~/.npm
~/.cache/Cypress/
key: ${{ runner.os }}-node-${{ steps.setup.outputs.date }}-${{ matrix.cache }}-${{ hashFiles('generator-jhipster/package-lock.json', 'generator-jhipster/**/package.json') }}
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 }}-${{ matrix.cache }}-
${{ runner.os }}-node-${{ steps.setup.outputs.date }}-angular-
${{ runner.os }}-node-${{ steps.setup.outputs.date }}-
${{ runner.os }}-node-${{ steps.setup.outputs.date }}
- name: 'SETUP: load maven cache'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,9 @@
#

name: Blueprint Generator
concurrency:
# Group PRs by head_ref, push to main branch by commit id, and others branch by ref.
group: ${{ github.workflow }}-${{ github.head_ref || (github.ref == 'refs/heads/main' && github.sha) || github.ref }}
cancel-in-progress: true
on:
push:
branches-ignore:
- 'dependabot/**'
- 'skip_ci*'
paths:
- 'package*.json'
- 'generators/*'
- 'cli/**'
- 'lib/**'
- 'utils/**'
- 'generators/generate-blueprint/**'
- 'generators/*/*.m?c?js'
pull_request:
types: [closed, opened, synchronize, reopened]
branches:
- '*'
paths:
- 'package*.json'
- 'cli/**'
- 'lib/**'
- 'utils/**'
- 'generators/*'
- 'generators/generate-blueprint/**'
- 'generators/*/*.m?c?js'
on: [workflow_call]
jobs:
applications:
check-generator-generate-blueprint:
runs-on: ubuntu-20.04
defaults:
run:
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,18 @@ on:
branches:
- '*'
jobs:
generator-jhipster:
check-npm-test:
if: >-
github.event.action != 'closed'
name: npm test
runs-on: ${{ matrix.os }}
runs-on: ubuntu-20.04
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
node_version: [16.14.0]
os: [ubuntu-20.04]
cache: [other]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
node-version: 16.14.0
- name: 'SETUP: load npm cache'
uses: actions/[email protected]
with:
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/generators.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#
# Copyright 2013-2022 the original author or authors from the JHipster project.
#
# This file is part of the JHipster project, see https://www.jhipster.tech/
# for more information.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: Generators
concurrency:
# Group PRs by head_ref, push to main branch by commit id, and others branch by ref.
group: ${{ github.workflow }}-${{ github.head_ref || (github.ref == 'refs/heads/main' && github.sha) || github.ref }}
cancel-in-progress: true
on:
push:
branches-ignore:
- 'dependabot/**'
- 'skip_ci*'
pull_request:
types: [closed, opened, synchronize, reopened]
branches:
- '*'
jobs:
generate-blueprint:
uses: ./.github/workflows/generator-generate-blueprint.yml
database-changelog-liquibase:
uses: ./.github/workflows/generator-database-changelog-liquibase.yml
check-generators:
runs-on: ubuntu-latest
needs: [generate-blueprint, database-changelog-liquibase]
if: >-
always() &&
(needs.generate-blueprint.result == 'skipped' || needs.generate-blueprint.result == 'success') &&
(needs.database-changelog-liquibase.result == 'skipped' || needs.database-changelog-liquibase.result == 'success') &&
github.event.action != 'closed'
steps:
- run: echo '${{ toJSON(needs) }}'
Loading