forked from jhipster/generator-jhipster
-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (114 loc) · 4.7 KB
/
generator-database-changelog-liquibase.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#
# Copyright 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: Incremental Changelog
on: [workflow_call]
env:
FORCE_COLOR: 2
jobs:
check-generator-database-changelog-liquibase:
name: ${{ matrix.app-type }}
runs-on: ubuntu-20.04
defaults:
run:
working-directory: ${{ github.workspace }}/app
if: >-
!contains(github.event.head_commit.message, '[ci skip]') &&
!contains(github.event.head_commit.message, '[skip ci]') &&
!contains(github.event.pull_request.title, '[skip ci]') &&
!contains(github.event.pull_request.title, '[ci skip]') &&
github.event.action != 'closed' &&
(github.event.pull_request.draft == false || !contains(github.event.pull_request.labels.*.name, 'pr: skip-ci')) &&
!contains(github.event.pull_request.user.login, 'dependabot')
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
app-type:
- liquibase-jdl-rename-field
include:
- app-type: liquibase-jdl-rename-field
entity: jdl
liquibase: jdl
environment: prod
war: 0
steps:
#----------------------------------------------------------------------
# Install all tools and check configuration
#----------------------------------------------------------------------
- name: 'SETUP: Checkout generator-jhipster'
uses: actions/checkout@v4
with:
path: generator-jhipster
- name: 'SETUP: environment'
id: setup
uses: ./generator-jhipster/.github/actions/setup
with:
application-sample: ${{ matrix.app-type }}
entities-sample: ${{ matrix.entity }}
application-environment: ${{ matrix.environment }}
application-packaging: ${{ (matrix.war == 1 && 'war') || 'jar' }}
- uses: jhipster/actions/setup-runner@v0
with:
node-version: ${{ steps.setup.outputs.node-version }}
java-version: ${{ steps.setup.outputs.java-version }}
maven-cache: true
#----------------------------------------------------------------------
# Install JHipster and generate project+entities
#----------------------------------------------------------------------
- name: 'GENERATION: install JHipster'
run: $JHI_SCRIPTS/10-install-jhipster.sh
- name: 'GENERATION: config'
run: $JHI_SCRIPTS/11-generate-config.sh
- name: 'GENERATION: project'
run: $JHI_SCRIPTS/12-generate-project.sh --force --creation-timestamp '2020-01-01'
env:
JHI_SAMPLES: ${{ github.workspace }}/generator-jhipster/test-integration/incremental-changelog-samples
- name: 'GENERATION: incremental project'
run: $JHI_SCRIPTS/12-generate-project.sh --incremental-changelog --force
env:
JHI_SAMPLES: ${{ github.workspace }}/generator-jhipster/test-integration/incremental-changelog-samples
JHI_APP: ${{ matrix.app-type }}-post
- name: 'GENERATION: incremental changes'
run: |
git add .
git -c color.ui=always diff --cached
- name: 'GENERATION: jhipster info'
run: $JHI_SCRIPTS/14-jhipster-info.sh
#----------------------------------------------------------------------
# Launch tests
#----------------------------------------------------------------------
- name: 'TESTS: check liquibase:diff'
run: ./mvnw liquibase:diff
- name: 'TESTS: backend'
run: npm run ci:backend:test
- name: 'TESTS: frontend'
run: npm run ci:frontend:test
- name: 'TESTS: packaging'
run: npm run ci:e2e:package
- name: 'TESTS: Start docker compose containers'
run: npm run ci:e2e:prepare
- name: 'E2E: Run'
id: e2e
run: npm run ci:e2e:run --if-present
- name: 'E2E: Store failure screenshots'
uses: actions/upload-artifact@v4
if: always() && steps.e2e.outcome == 'failure'
with:
name: screenshots-${{ matrix.app-type }}
path: ${{ steps.setup.outputs.application-path }}/*/cypress/screenshots