@@ -97,45 +97,29 @@ jobs:
97
97
- uses : actions/setup-python@v4
98
98
with :
99
99
python-version : 3.7
100
- - name : Install tools
101
- run : |
102
- curl -sSL https://install.python-poetry.org | python3 - --version 1.4.2
103
- - name : Build Package
104
- run : |
100
+ - run : curl -sSL https://install.python-poetry.org | python3 - --version 1.4.2
101
+ - run : |
105
102
poetry install
106
103
poetry build
107
- - name : artifact-splunk-unpacked
108
- uses : actions/upload-artifact@v3
104
+ - run : |
105
+ poetry run ucc-gen build \
106
+ --source=tests/testdata/Splunk_TA_UCCExample/package \
107
+ --config=tests/testdata/Splunk_TA_UCCExample/globalConfig.json \
108
+ --ta-version=0.0.1
109
+ - uses : actions/upload-artifact@v3
109
110
with :
110
111
name : package
111
112
path : dist/*
112
113
if : always()
113
-
114
- prerequisites-ui-tests :
115
- runs-on : ubuntu-latest
116
- outputs :
117
- ta_example_version : ${{ steps.ta-example.outputs.version }}
118
- steps :
119
- - name : Fetch latest version of Splunk_TA example
120
- id : ta-example
121
- run : |
122
- ta_example_version=`basename $(curl -H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' -s https://api.github.com/repos/splunk/splunk-add-on-for-ucc-example/releases/latest | jq -r '.assets | last | .browser_download_url')`
123
- echo "version=$ta_example_version" >> $GITHUB_OUTPUT
124
- - name : Cache Splunk_TA example
125
- id : cache_ta
126
- uses : actions/cache@v3
114
+ - uses : actions/upload-artifact@v3
127
115
with :
128
- path : Splunk_TA*.spl
129
- key : ${{ steps.ta-example.outputs.version }}
130
- - name : Download Splunk_TA example
131
- if : steps.cache_ta.outputs.cache-hit != 'true'
132
- run : curl -s https://api.github.com/repos/splunk/splunk-add-on-for-ucc-example/releases/latest | jq -r '.assets | last | .browser_download_url' | wget -i -
116
+ name : output
117
+ path : output/*
133
118
134
119
run-ui-tests :
135
120
needs :
136
121
- meta
137
122
- build
138
- - prerequisites-ui-tests
139
123
runs-on : ubuntu-latest
140
124
permissions :
141
125
id-token : write
@@ -146,7 +130,7 @@ jobs:
146
130
matrix :
147
131
splunk : ${{ fromJson(needs.meta.outputs.matrix_supportedSplunk) }}
148
132
browser : ["chrome", "firefox"]
149
- test_suit : [
133
+ test_suite : [
150
134
" test_splunk_ta_example_addon_logging" ,
151
135
" test_splunk_ta_example_addon_account" ,
152
136
" test_splunk_ta_example_addon_proxy" ,
@@ -162,31 +146,24 @@ jobs:
162
146
with :
163
147
name : package
164
148
path : dist/
165
- - name : update submodule
166
- run : |
167
- git submodule sync
168
- git submodule update --recursive --remote
169
- - name : Cache Splunk_TA example
170
- id : cache_ta
171
- uses : actions/cache@v3
149
+ - uses : actions/download-artifact@v3
172
150
with :
173
- path : Splunk_TA*.spl
174
- key : ${{ needs.prerequisites-ui-tests.outputs.ta_example_version }}
175
- - name : Setup for testing
176
- run : |
177
- mkdir output test-results
178
- tar -xvf Splunk_TA*.spl -C output/
179
- pip install git+https://github.com/pixelb/crudini
151
+ name : output
152
+ path : output/
153
+ - run : |
154
+ git submodule sync
155
+ git submodule update --recursive --remote
180
156
- name : Splunk Testing
181
157
run : |
158
+ mkdir test-results
182
159
export SPLUNK_VERSION=${{ matrix.splunk.version }}
183
- SPLUNK_APP_ID=$(crudini --get tests/deps/splunk-add-on-for-ucc-example/package/default/app.conf id name)
160
+ SPLUNK_APP_ID=Splunk_TA_UCCExample
184
161
export SPLUNK_APP_ID
185
- SPLUNK_APP_PACKAGE=output/$(ls output/)
162
+ SPLUNK_APP_PACKAGE=output/Splunk_TA_UCCExample
186
163
export SPLUNK_APP_PACKAGE
187
164
export TEST_SET=tests/ui
188
165
export TEST_BROWSER="${{ matrix.browser }}"
189
- export TEST_SUITE="-k ${{ matrix.test_suit }}"
166
+ export TEST_SUITE="-k ${{ matrix.test_suite }}"
190
167
export SAUCE_USERNAME="${{ secrets.SAUCE_USERNAME }}"
191
168
export SAUCE_PASSWORD="${{ secrets.SAUCE_PASSWORD }}"
192
169
export SAUCE_TUNNEL_ID="${{ secrets.SAUCE_TUNNEL_ID }}"
@@ -229,12 +206,12 @@ jobs:
229
206
- uses : actions/upload-artifact@v3
230
207
if : always()
231
208
with :
232
- name : test-results-${{ matrix.splunk }}_${{ matrix.python-version }}_${{ matrix.browser }}_${{ matrix.test_suit }}
209
+ name : test-results-${{ matrix.splunk }}_${{ matrix.python-version }}_${{ matrix.browser }}_${{ matrix.test_suite }}
233
210
path : test-results/*
234
211
- uses : dorny/test-reporter@v1
235
212
if : always()
236
213
with :
237
- name : test-report-${{ matrix.splunk }}_${{ matrix.python-version }}_${{ matrix.browser }}_${{ matrix.test_suit }}
214
+ name : test-report-${{ matrix.splunk }}_${{ matrix.python-version }}_${{ matrix.browser }}_${{ matrix.test_suite }}
238
215
path : " test-results/*.xml"
239
216
reporter : java-junit
240
217
0 commit comments