-
-
Notifications
You must be signed in to change notification settings - Fork 4k
104 lines (103 loc) · 4.26 KB
/
generator-generate-blueprint.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
#
# 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: Blueprint Generator
on: [workflow_call]
env:
FORCE_COLOR: 2
jobs:
check-generator-generate-blueprint:
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' &&
!contains(github.event.pull_request.labels.*.name, 'pr: skip-ci')
timeout-minutes: 40
steps:
#----------------------------------------------------------------------
# Install all tools and check configuration
#----------------------------------------------------------------------
- name: 'SETUP: Checkout generator-jhipster'
uses: actions/checkout@v4
with:
path: generator-jhipster
fetch-depth: 2
- name: 'SETUP: environment'
id: setup
uses: ./generator-jhipster/.github/actions/setup
with:
application-sample: ng-default
executable: jhipster-foo
- 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
env:
JHI_INSTALL_GLOBALLY: 'true'
- name: 'GENERATION: generate blueprint'
run: |
cd ..
mkdir generator-jhipster-foo
cd generator-jhipster-foo
cp $JHI_INTEG/generate-blueprint-samples/default/.yo-rc.json .
jhipster generate-blueprint --force --link-jhipster-dependency --generate-snapshots --skip-install
npm link generator-jhipster
npm link
- name: 'GENERATION: config'
run: $JHI_SCRIPTS/11-generate-config.sh
- name: 'GENERATION: project'
run: $JHI_SCRIPTS/12-generate-project.sh ${{ matrix.extra-args }} ${{ matrix.new-extra-args }} --blueprints foo
- name: 'GENERATION: jhipster info'
run: $JHI_SCRIPTS/14-jhipster-info.sh
#----------------------------------------------------------------------
# Launch tests
#----------------------------------------------------------------------
- name: 'TESTS: blueprint files should be written'
run: |
ls template-file-client
ls template-file-common
ls template-file-cypress
ls template-file-server
- name: 'TESTS: backend'
id: backend
if: steps.compare.outputs.equals != 'true' && matrix.skip-backend-tests != 'true'
run: npm run ci:backend:test
- name: 'BACKEND: Store failure logs'
uses: actions/upload-artifact@v4
if: always() && steps.backend.outcome == 'failure'
with:
name: log-${{ matrix.app-sample }}
path: ${{ steps.setup.outputs.application-path }}/*/test-results/**/*.xml
- name: 'E2E: Store failure screenshots'
uses: actions/upload-artifact@v4
if: always() && steps.e2e.outcome == 'failure'
with:
name: screenshots-${{ matrix.app-sample }}
path: ${{ steps.setup.outputs.application-path }}/*/cypress/screenshots