-
-
Notifications
You must be signed in to change notification settings - Fork 54
149 lines (147 loc) · 5.39 KB
/
ios-oauth2.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
name: iOS-E2E-OAuth2
on:
push:
branches:
- 'main'
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:
check-dependencies:
runs-on: ubuntu-latest
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: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: check-dependencies
run: |
cd generators/react-native/resources/expo
npm run check-dependencies
build-matrix:
runs-on: ubuntu-latest
needs: [check-dependencies]
outputs:
matrix: ${{ steps.build.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- id: build
run: |
npm ci --ignore-scripts --omit=dev
cli/cli.cjs github-build-matrix --samples-folder oauth2
applications:
name: e2e-${{ matrix.app_type }}-${{ matrix.jhipster_version }}
runs-on: ${{ matrix.os }}
needs: build-matrix
timeout-minutes: 90
defaults:
run:
working-directory: ${{ github.workspace }}/client
strategy:
fail-fast: false
matrix: ${{fromJson(needs.build-matrix.outputs.matrix)}}
env:
SCRIPT_DIR: ${{ github.workspace }}/generator-jhipster-react-native/test/scripts
FORCE_COLOR: true
steps:
- uses: jhipster/actions/create-app-path@v0
with:
path: client
- uses: jhipster/actions/create-app-path@v0
with:
path: backend
- uses: jhipster/actions/setup-runner@v0
with:
node-version: ${{ matrix.node-version }}
java-version: ${{ matrix.java-version }}
maven-cache: true
binary-dir: ${{ github.workspace }}/generator-jhipster-react-native/cli
- uses: actions/checkout@v4
with:
path: generator-jhipster-react-native
fetch-depth: 2
- 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 install
working-directory: ${{ github.workspace }}/generator-jhipster-react-native
- run: cli.cjs generate-sample ${{ matrix.sample-name }} --force --skip-commit-hook
working-directory: ${{ github.workspace }}/backend
- uses: jhipster/actions/compare-sample@v0
id: compare-backend
if: >-
github.event.pull_request &&
contains(github.event.pull_request.labels.*.name, 'pr: compare-backend')
with:
application-base-path: ${{ github.workspace }}/backend-base
application-folder: backend
compare-folder: backend
generator-path: generator-jhipster-react-native
# add --samples-folder oauth2
cmd: cli.cjs generate-sample ${{ matrix.sample-name }} --samples-folder oauth2 --force --skip-git --skip-commit-hook
- uses: jhipster/actions/compare-sample@v0
id: compare
if: >-
github.event.pull_request &&
!contains(github.event.pull_request.labels.*.name, 'pr: disable-compare') &&
steps.compare-backend.outputs.has-changes != 'true'
with:
application-folder: backend
compare-folder: client
generator-path: generator-jhipster-react-native
# add --samples-folder oauth2
cmd: cli.cjs generate-sample ${{ matrix.sample-name }} --force --skip-git --skip-commit-hook
- run: npm install
if: steps.compare.outputs.equals != 'true'
- run: npx expo prebuild -p ios
- run: git add . && git diff
- run: npm run e2e:build:ios
- run: |
npm run app:start &
npm install -g wait-on
wait-on -t 60000 http-get://127.0.0.1:8080/management/health
if: matrix.backend != 'false'
working-directory: ${{ github.workspace }}/backend
- run: npm run e2e:test:ios
- uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: expo-app-${{ matrix.app_type }}-${{ matrix.jhipster_version }}
path: |
${{ github.workspace }}/client/
!${{ github.workspace }}/**/android
!${{ github.workspace }}/**/ios
!${{ github.workspace }}/**/node_modules
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