-
-
Notifications
You must be signed in to change notification settings - Fork 6
178 lines (157 loc) · 5.87 KB
/
integration.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
#
# 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
#
# http://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: Integration Test JHipster 8
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:
workflow_dispatch:
inputs:
storeApplication:
description: 'Store application'
default: ''
required: false
push:
branches-ignore:
- 'dependabot/**'
- 'skip_ci*'
pull_request:
branches:
- '*'
jobs:
applications:
name: jOOQ (${{ matrix.build }}, reactive ${{ matrix.reactive }}, ${{ matrix.generator-jhipster }})
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: app
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
generator-jhipster: [jhipster/generator-jhipster#main]
build: [maven, gradle]
reactive: ['false', 'true']
app-type:
- app
include:
- app-type: app
entity: sql
steps:
#----------------------------------------------------------------------
# Install all tools and check configuration
#----------------------------------------------------------------------
- uses: actions/checkout@v4
with:
path: generator-jhipster-jooq
- uses: actions/checkout@v4
with:
repository: jhipster/generator-jhipster
path: generator-jhipster
- name: 'SETUP: environment'
id: setup
uses: ./generator-jhipster/.github/actions/setup
with:
entities-sample: ${{ matrix.entity }}
jhipster-bom-branch: ignore
- uses: actions/setup-node@v3
with:
node-version: ${{ steps.setup.outputs.node-version }}
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
#----------------------------------------------------------------------
# Install JHipster and generate project+entities
#----------------------------------------------------------------------
- name: 'GENERATION: install generator-jhipster-jooq'
run: |
npm ci --prod
npm link
working-directory: generator-jhipster-jooq
- name: 'GENERATION: entities'
run: |
$JHI_SCRIPTS/11-generate-config.sh
ls -la $JHI_FOLDER_APP/.jhipster/
rm $JHI_FOLDER_APP/.jhipster/*JpaFiltering*
- name: 'GENERATION: project'
run: jhipster-jooq jdl --skip-jhipster-dependencies --no-insight --skip-checks --build ${{ matrix.build }} --inline "application { config { prodDatabaseType postgresql, buildTool ${{ matrix.build }}, reactive ${{ matrix.reactive }}, testFrameworks [cypress] } } "
id: app
#----------------------------------------------------------------------
# Print package.json, if doesn't exist, it's a microservice, create it.
#----------------------------------------------------------------------
- name: Package.json information
run: |
cat package.json || true
cat */package.json || true
- name: Project information
run: jhipster-jooq info
- name: Folder information
run: ls -la
#----------------------------------------------------------------------
# Tests
#----------------------------------------------------------------------
- name: Backend info
if: ${{ steps.app.outcome == 'success' && always() }}
run: npm run backend:info
id: backend_info
- name: Backend javadoc
if: ${{ steps.backend_info.outcome == 'success' && always() }}
run: npm run backend:doc:test
- name: Backend test
if: ${{ steps.backend_info.outcome == 'success' && always() }}
run: npm run ci:backend:test
timeout-minutes: 10
- name: E2E Packaging
if: ${{ steps.app.outcome == 'success' && always() }}
run: npm run ci:e2e:package
id: packaging
timeout-minutes: 5
- name: E2E Prepare
if: ${{ steps.packaging.outcome == 'success' && always() }}
run: npm run ci:e2e:prepare
timeout-minutes: 5
- name: End-to-End
if: ${{ steps.packaging.outcome == 'success' && always() }}
run: npm run ci:e2e:run
timeout-minutes: 10
- name: Create application archive
if: always() && github.event.inputs.storeApplication != ''
run: git archive HEAD -o archive.zip
- name: Upload application archive
uses: actions/upload-artifact@v2
if: always() && github.event.inputs.storeApplication != ''
with:
name: jhipster-jooq-${{ matrix.build }}.zip
path: app/archive.zip
check-applications:
permissions:
contents: none
runs-on: ubuntu-latest
needs: [applications]
if: always()
steps:
- run: |
echo '${{ toJSON(needs) }}'
if [ 'skipped' == '${{ needs.applications.result }}' ] || [ 'success' == '${{ needs.applications.result }}' ] || [ 'closed' == '${{ github.event.action }}' ]; then
exit 0
fi
exit 1