1
1
name : Run Native Pipeline
2
2
on :
3
3
workflow_dispatch :
4
+ inputs :
5
+ mendix_version :
6
+ description : " Provide the SP version to be used (e.g., 10.14.0.43709) - has to be a released version (Default: latest from Mendix versions.json)"
7
+ required : false
8
+ default : " "
4
9
5
- # schedule:
6
- # - cron: "0 6 * * *"
10
+ nt_branch :
11
+ description : " Native Template branch to use (Default: master)"
12
+ default : " master"
13
+ required : false
14
+ type : string
7
15
8
- # push:
9
- # branches: [master]
16
+ workspace :
17
+ description : " Select a widget to test (Default will run all)"
18
+ required : true
19
+ default : " *-native"
20
+ type : choice
21
+ options :
22
+ - " *-native"
23
+ - accordion-native
24
+ - activity-indicator-native
25
+ - animation-native
26
+ - app-events-native
27
+ - background-gradient-native
28
+ - background-image-native
29
+ - badge-native
30
+ - bar-chart-native
31
+ - barcode-scanner-native
32
+ - bottom-sheet-native
33
+ - carousel-native
34
+ - color-picker-native
35
+ - column-chart-native
36
+ - feedback-native
37
+ - floating-action-button-native
38
+ - gallery-native
39
+ - gallery-text-filter-native
40
+ - image-native
41
+ - intro-screen-native
42
+ - line-chart-native
43
+ - listview-swipe-native
44
+ - maps-native
45
+ - notifications-native
46
+ - pie-doughnut-chart-native
47
+ - popup-menu-native
48
+ - progress-bar-native
49
+ - qr-code-native
50
+ - radio-buttons-native
51
+ - range-slider-native
52
+ - rating-native
53
+ - repeater-native
54
+ - safe-area-view-native
55
+ - signature-native
56
+ - slider-native
57
+ - switch-native
58
+ - toggle-buttons-native
59
+ - video-player-native
60
+ - web-view-native
10
61
11
62
pull_request :
12
63
# branches: [master]
@@ -23,34 +74,49 @@ jobs:
23
74
- name : " Determine scope"
24
75
id : scope
25
76
run : |
26
- echo "Event name: ' ${{ github.event_name }}'"
27
- if [ "${{ github.event_name }}" == "pull_request" ]; then
28
- echo "scope=--since --include '*-native '" >> $GITHUB_OUTPUT
77
+ if [ -n "${{ github.event.inputs.workspace }}" ] && [ " ${{ github.event.inputs.workspace }}" != "*-native" ]; then
78
+ selected_workspaces=$(echo "${{ github.event.inputs.workspace }}" | sed 's/,/ /g')
79
+ echo "scope=--all --include '${selected_workspaces} '" >> $GITHUB_OUTPUT
29
80
else
30
- echo "scope=--include '*-native'" >> $GITHUB_OUTPUT
81
+ if [ "${{ github.event_name }}" == "pull_request" ]; then
82
+ echo "scope=--since --include '*-native'" >> $GITHUB_OUTPUT
83
+ else
84
+ echo "scope=--all--include '*-native'" >> $GITHUB_OUTPUT
85
+ fi
31
86
fi
32
87
33
88
- name : " Debug Scope Output"
34
89
run : |
35
90
echo "Scope is: ${{ steps.scope.outputs.scope }}"
91
+
36
92
mendix-version :
37
93
runs-on : ubuntu-22.04
94
+ outputs :
95
+ mendix_version : ${{ steps.set-mendix-version.outputs.MENDIX_VERSION }}
38
96
steps :
39
97
- name : " Check out code"
40
98
uses : actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
41
- - name : " Get Mendix version"
99
+ - name : " Get Mendix version from JSON "
42
100
id : get-mendix-version
43
101
uses : notiz-dev/github-action-json-property@7a701887f4b568b23eb7b78bb0fc49aaeb1b68d3 # v0.2.0
44
102
with :
45
103
path : configs/e2e/mendix-versions.json
46
104
prop_path : latest
47
- outputs :
48
- mendix-version : ${{ steps.get-mendix-version.outputs.prop }}
105
+ - name : Set Mendix version
106
+ id : set-mendix-version
107
+ run : |
108
+ if [[ -n "${{ github.event.inputs.mendix_version }}" ]]; then
109
+ echo "MENDIX_VERSION=${{ github.event.inputs.mendix_version }}" >> $GITHUB_OUTPUT
110
+ else
111
+ echo "MENDIX_VERSION=${{ steps.get-mendix-version.outputs.prop }}" >> $GITHUB_OUTPUT
112
+ fi
113
+ - name : " Debug Mendix Version"
114
+ run : |
115
+ echo "Mendix Version: ${{ steps.set-mendix-version.outputs.MENDIX_VERSION }}"
116
+
49
117
docker-images :
50
118
needs : mendix-version
51
119
runs-on : ubuntu-22.04
52
- env :
53
- MENDIX_VERSION : ${{ needs.mendix-version.outputs.mendix-version }}
54
120
steps :
55
121
- name : " Login to GitHub Container Registry"
56
122
uses : docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
60
126
password : ${{ secrets.GITHUB_TOKEN }}
61
127
- name : " Check if docker image already exists"
62
128
run : |
63
- docker manifest inspect ghcr.io/mendix/native-widgets/mxbuild:${{ env.MENDIX_VERSION }} || EXIT_CODE=$?
129
+ docker manifest inspect ghcr.io/mendix/native-widgets/mxbuild:${{ needs.mendix-version.outputs.mendix_version }} || EXIT_CODE=$?
64
130
echo "IMAGE_MISSING=$EXIT_CODE" >> $GITHUB_ENV
65
131
- name : " Check out code"
66
132
uses : actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
@@ -72,12 +138,11 @@ jobs:
72
138
file : ./.github/scripts/mxbuild.Dockerfile
73
139
context : ./.github/scripts
74
140
build-args : |
75
- MENDIX_VERSION=${{ env.MENDIX_VERSION }}
141
+ MENDIX_VERSION=${{ needs.mendix-version.outputs.mendix_version }}
76
142
push : true
77
- tags : ghcr.io/mendix/native-widgets/mxbuild:${{ env.MENDIX_VERSION }}
78
- secrets : GIT_AUTH_TOKEN=${{ secrets.GITHUB_TOKEN }}
143
+ tags : ghcr.io/mendix/native-widgets/mxbuild:${{ needs.mendix-version.outputs.mendix_version }}
79
144
resources :
80
- needs : scope
145
+ needs : [ scope, mendix-version]
81
146
runs-on : ubuntu-22.04
82
147
permissions :
83
148
packages : read
@@ -111,7 +176,11 @@ jobs:
111
176
project :
112
177
needs : [resources, mendix-version]
113
178
runs-on : ubuntu-22.04
114
- container : ghcr.io/mendix/native-widgets/mxbuild:${{ needs.mendix-version.outputs.mendix-version }}
179
+ container :
180
+ image : ghcr.io/mendix/native-widgets/mxbuild:${{ needs.mendix-version.outputs.mendix_version }}
181
+ credentials :
182
+ username : ${{ github.actor }}
183
+ password : ${{ secrets.GITHUB_TOKEN }}
115
184
steps :
116
185
- name : " Make sure curl is installed"
117
186
run : |
@@ -122,12 +191,14 @@ jobs:
122
191
- name : " Extract test project"
123
192
uses : montudor/action-zip@0852c26906e00f8a315c704958823928d8018b28 # v1.0.0
124
193
with :
125
- args : unzip -qq project.zip
194
+ args : unzip -qq project.zip -d .
126
195
- name : " Download resources artifact"
127
196
uses : actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
128
197
with :
129
198
name : resources
130
199
path : resources
200
+ - name : " List resources"
201
+ run : ls -R resources
131
202
- name : " Move widgets"
132
203
shell : bash
133
204
run : |
@@ -160,7 +231,11 @@ jobs:
160
231
android-bundle :
161
232
needs : [project, mendix-version]
162
233
runs-on : ubuntu-22.04
163
- container : ghcr.io/mendix/native-widgets/mxbuild:${{ needs.mendix-version.outputs.mendix-version }}
234
+ container :
235
+ image : ghcr.io/mendix/native-widgets/mxbuild:${{ needs.mendix-version.outputs.mendix_version }}
236
+ credentials :
237
+ username : ${{ github.actor }}
238
+ password : ${{ secrets.GITHUB_TOKEN }}
164
239
steps :
165
240
- name : " Check out code"
166
241
uses : actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
@@ -176,7 +251,11 @@ jobs:
176
251
ios-bundle :
177
252
needs : [project, mendix-version]
178
253
runs-on : ubuntu-22.04
179
- container : ghcr.io/mendix/native-widgets/mxbuild:${{ needs.mendix-version.outputs.mendix-version }}
254
+ container :
255
+ image : ghcr.io/mendix/native-widgets/mxbuild:${{ needs.mendix-version.outputs.mendix_version }}
256
+ credentials :
257
+ username : ${{ github.actor }}
258
+ password : ${{ secrets.GITHUB_TOKEN }}
180
259
steps :
181
260
- name : " Check out code"
182
261
uses : actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
@@ -197,7 +276,7 @@ jobs:
197
276
uses : actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
198
277
with :
199
278
repository : mendix/native-template
200
- ref : master
279
+ ref : ${{ github.event.inputs.nt_branch || ' master' }}
201
280
path : native-template
202
281
- name : " Check out code"
203
282
uses : actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
@@ -246,7 +325,7 @@ jobs:
246
325
uses : actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
247
326
with :
248
327
repository : mendix/native-template
249
- ref : master
328
+ ref : ${{ github.event.inputs.nt_branch || ' master' }}
250
329
path : native-template
251
330
- name : " Check out code"
252
331
uses : actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
@@ -344,7 +423,7 @@ jobs:
344
423
uses : ./.github/actions/start-runtime
345
424
with :
346
425
mda-file : automation.mda
347
- mendix-version : ${{ needs.mendix-version.outputs.mendix-version }}
426
+ mendix-version : ${{ needs.mendix-version.outputs.mendix_version }}
348
427
- name : " Download Android app"
349
428
uses : actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
350
429
with :
@@ -438,7 +517,7 @@ jobs:
438
517
uses : ./.github/actions/start-runtime
439
518
with :
440
519
mda-file : automation.mda
441
- mendix-version : ${{ needs.mendix-version.outputs.mendix-version }}
520
+ mendix-version : ${{ needs.mendix-version.outputs.mendix_version }}
442
521
- name : " Download iOS app"
443
522
uses : actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
444
523
with :
0 commit comments