-
-
Notifications
You must be signed in to change notification settings - Fork 54
134 lines (134 loc) · 4.83 KB
/
ios.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
name: iOS-E2E
on:
workflow_dispatch:
inputs:
recordVideo:
description: 'Record failing E2E Tests'
required: false
default: 'false'
screenshots:
description: 'Screenshot failing E2E Tests'
required: false
default: 'false'
push:
branches:
- '*'
- '!dependabot/**'
pull_request:
defaults:
run:
shell: bash
concurrency:
# Group by workflow and ref, limit to 1 for pull requests
group: ${{ github.workflow }}-${{ github.ref }}-${{ startsWith(github.ref, 'refs/pull/') || github.run_number }}
# Cancel intermediate pull request builds
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
applications:
name: e2e-${{ matrix.app_type }}-${{ matrix.jhipster_version }}
runs-on: macos-13
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]') && !contains(github.event.ref_type, '[tag]')"
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
jhipster_version: [7]
node_version: [16.x]
app_type:
- JwtDtoApp
- JwtWebsocketsApp
- JwtHealthPointsApp
- JwtFlickrApp
- OauthApp
include:
- app_type: JwtDtoApp
auth_type: jwt
dto: true
- app_type: JwtWebsocketsApp
auth_type: jwt
dto: false
websockets: true
- app_type: JwtHealthPointsApp
auth_type: jwt
dto: false
entity_jdl: entities-21points.jdl
- app_type: JwtFlickrApp
auth_type: jwt
dto: false
entity_jdl: entities-flickr2.jdl
- app_type: OauthApp
auth_type: oauth2
dto: false
env:
JHI_REACT_NATIVE_APP_NAME: ${{ matrix.app_type }}
JHI_AUTH_TYPE: ${{ matrix.auth_type }}
JHI_DTO: ${{ matrix.dto }}
JHI_WEBSOCKETS: ${{ matrix.websockets }}
JHI_ENTITY_JDL: ${{ matrix.entity_jdl }}
JHIPSTER_VERSION: ${{ matrix.jhipster_version }}
SCRIPT_DIR: ./test/scripts
PLATFORM: ios
JHI_RECORD_VIDEO: ${{ github.event.inputs.recordVideo || 'false' }}
JHI_SCREENSHOTS: ${{ github.event.inputs.screenshots || 'false' }}
steps:
- uses: actions/[email protected]
- uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '11.x'
- 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
- uses: actions/[email protected]
with:
node-version: ${{ matrix.node_version }}
- run: $SCRIPT_DIR/git-config.sh
name: Config git variables
- run: $SCRIPT_DIR/install-node-dependencies.sh
name: 'TOOLS: install node dependencies'
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
- uses: nick-invision/[email protected]
name: 'TOOLS: installing Detox and its dependencies'
with:
max_attempts: 3
timeout_minutes: 60
command: $SCRIPT_DIR/install-detox.sh
retry_wait_seconds: 15
- run: $SCRIPT_DIR/display-tools.sh
name: 'TOOLS: display tools'
- run: npm i && npm link
name: 'TOOLS: npm install and link in generator-jhipster-react-native'
- run: $SCRIPT_DIR/copy-jdl-file.sh
name: 'SETUP: copy the JDL file for the backend and app'
- run: $SCRIPT_DIR/generate-jhipster-backend.sh
name: 'GENERATING: generate jhipster backend'
- run: $SCRIPT_DIR/generate-react-native-app.sh
name: 'GENERATING: generate react-native app'
- run: $SCRIPT_DIR/run-detox-tests.sh
name: 'TESTING: run detox tests'
- run: $SCRIPT_DIR/rename-detox-screenshots.sh
name: 'TESTING: rename detox screenshots to a valid filename'
- uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: expo-app-${{ matrix.app_type }}-${{ matrix.jhipster_version }}
path: |
${{ runner.workspace }}/${{ matrix.app_type }}/**/*
!${{ runner.workspace }}/${{ matrix.app_type }}/node_modules
!${{ runner.workspace }}/${{ matrix.app_type }}/e2e/Exponent.app
ios-result:
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 }}' ]); then
exit 0
fi
if [ 'closed' == '${{ github.event.action }}' ]; then
exit 0
fi
exit 1