1010
1111 # Allows you to run this workflow manually from the Actions tab
1212 workflow_dispatch :
13+ inputs :
14+ custom_tag :
15+ description : ' Custom Docker tag (optional)'
16+ required : false
17+ default : ' '
1318
1419# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1520jobs :
6469
6570 services :
6671 mongodb :
67- image : mongo:6 .0
72+ image : mongo:8 .0
6873 options : >-
6974 --health-cmd mongosh
7075 --health-interval 10s
7479 - 27017:27017
7580
7681 container :
77- image : countly/countly-core:latest
82+ image : countly/countly-core:pipelines-${{ inputs.custom_tag || github.base_ref || github.ref_name }}
7883 env :
7984 COUNTLY_CONFIG__MONGODB_HOST : mongodb
85+ COUNTLY_CONFIG_API_PREVENT_JOBS : true
8086
8187 steps :
8288 - uses : actions/checkout@v3
99105 - name : ESLint
100106 shell : bash
101107 run : |
102- npm install eslint
108+ npm install eslint@8.57.0
103109 npx eslint .
104110
105111 - name : NPM install
@@ -120,7 +126,7 @@ jobs:
120126
121127 services :
122128 mongodb :
123- image : mongo:6 .0
129+ image : mongo:8 .0
124130 options : >-
125131 --health-cmd mongosh
126132 --health-interval 10s
@@ -130,9 +136,10 @@ jobs:
130136 - 27017:27017
131137
132138 container :
133- image : countly/countly-core:latest
139+ image : countly/countly-core:pipelines-${{ inputs.custom_tag || github.base_ref || github.ref_name }}
134140 env :
135141 COUNTLY_CONFIG__MONGODB_HOST : mongodb
142+ COUNTLY_CONFIG_API_PREVENT_JOBS : true
136143
137144 steps :
138145 - uses : actions/checkout@v3
@@ -153,6 +160,11 @@ jobs:
153160 shell : bash
154161 run : " sed -i 's/port: 3001,/port: 3001, workers: 1,/' /opt/countly/api/config.js"
155162
163+ - name : NPM install
164+ shell : bash
165+ working-directory : /opt/countly
166+ run : npm install
167+
156168 - name : Run tests
157169 shell : bash
158170 working-directory : /opt/countly
@@ -166,7 +178,7 @@ jobs:
166178
167179 services :
168180 mongodb :
169- image : mongo:6 .0
181+ image : mongo:8 .0
170182 options : >-
171183 --health-cmd mongosh
172184 --health-interval 10s
@@ -176,9 +188,10 @@ jobs:
176188 - 27017:27017
177189
178190 container :
179- image : countly/countly-core:latest
191+ image : countly/countly-core:pipelines-${{ inputs.custom_tag || github.base_ref || github.ref_name }}
180192 env :
181193 COUNTLY_CONFIG__MONGODB_HOST : mongodb
194+ COUNTLY_CONFIG_API_PREVENT_JOBS : true
182195
183196 steps :
184197 - uses : actions/checkout@v3
@@ -199,6 +212,11 @@ jobs:
199212 shell : bash
200213 run : " sed -i 's/port: 3001,/port: 3001, workers: 1,/' /opt/countly/api/config.js"
201214
215+ - name : NPM install
216+ shell : bash
217+ working-directory : /opt/countly
218+ run : npm install
219+
202220 - name : Install plugins
203221 shell : bash
204222 run : |
@@ -212,13 +230,13 @@ jobs:
212230 npm install
213231 /sbin/my_init &
214232 node bin/scripts/test.connection.js
215- npx grunt mochaTest
233+ npx grunt mochaTest
216234 ui-test-dashboard :
217235 runs-on : ubuntu-latest
218236
219237 services :
220238 mongodb :
221- image : mongo:6 .0
239+ image : mongo:8 .0
222240 options : >-
223241 --health-cmd mongosh
224242 --health-interval 10s
@@ -228,9 +246,10 @@ jobs:
228246 - 27017:27017
229247
230248 container :
231- image : countly/countly-core:latest
249+ image : countly/countly-core:pipelines-${{ inputs.custom_tag || github.base_ref || github.ref_name }}
232250 env :
233251 COUNTLY_CONFIG__MONGODB_HOST : mongodb
252+ COUNTLY_CONFIG_API_PREVENT_JOBS : true
234253
235254 steps :
236255 - uses : actions/checkout@v2
@@ -251,6 +270,11 @@ jobs:
251270 shell : bash
252271 run : " sed -i 's/mongosh --quiet/mongosh --host mongodb --quiet/' /opt/countly/bin/backup/import_events.sh && sed -i 's/mongoimport --db/mongoimport --host mongodb --db/' /opt/countly/bin/backup/import_events.sh"
253272
273+ - name : NPM install
274+ shell : bash
275+ working-directory : /opt/countly
276+ run : npm install
277+
254278 - name : Prepare environment
255279 shell : bash
256280 working-directory : /opt/countly
@@ -277,7 +301,8 @@ jobs:
277301 /sbin/my_init &
278302 cd ui-tests
279303 npm install
280- npm run cy:run:dashboard
304+ xvfb-run --auto-servernum --server-args="-screen 0 1280x1024x24" \
305+ npm run cy:run:dashboard --headless --no-sandbox --disable-gpu --disable-dev-shm-usage
281306
282307 - name : Upload UI tests artifacts
283308 if : ${{ failure() }}
@@ -288,13 +313,13 @@ jobs:
288313 mkdir -p screenshots videos
289314 tar zcvf "$ARTIFACT_ARCHIVE_NAME" screenshots videos
290315 curl -o /tmp/uploader.log -u "${{ secrets.BOX_UPLOAD_AUTH }}" ${{ secrets.BOX_UPLOAD_PATH }} -T "$ARTIFACT_ARCHIVE_NAME"
291-
316+
292317 ui-test-onboarding :
293318 runs-on : ubuntu-latest
294319
295320 services :
296321 mongodb :
297- image : mongo:6 .0
322+ image : mongo:8 .0
298323 options : >-
299324 --health-cmd mongosh
300325 --health-interval 10s
@@ -304,9 +329,10 @@ jobs:
304329 - 27017:27017
305330
306331 container :
307- image : countly/countly-core:latest
332+ image : countly/countly-core:pipelines-${{ inputs.custom_tag || github.base_ref || github.ref_name }}
308333 env :
309334 COUNTLY_CONFIG__MONGODB_HOST : mongodb
335+ COUNTLY_CONFIG_API_PREVENT_JOBS : true
310336
311337 steps :
312338 - uses : actions/checkout@v2
@@ -327,6 +353,11 @@ jobs:
327353 shell : bash
328354 run : " sed -i 's/mongosh --quiet/mongosh --host mongodb --quiet/' /opt/countly/bin/backup/import_events.sh && sed -i 's/mongoimport --db/mongoimport --host mongodb --db/' /opt/countly/bin/backup/import_events.sh"
329355
356+ - name : NPM install
357+ shell : bash
358+ working-directory : /opt/countly
359+ run : npm install
360+
330361 - name : Prepare environment
331362 shell : bash
332363 working-directory : /opt/countly
@@ -349,7 +380,8 @@ jobs:
349380 /sbin/my_init &
350381 cd ui-tests
351382 npm install
352- npm run cy:run:onboarding
383+ xvfb-run --auto-servernum --server-args="-screen 0 1280x1024x24" \
384+ npm run cy:run:onboarding --headless --no-sandbox --disable-gpu --disable-dev-shm-usage
353385
354386 - name : Upload UI tests artifacts
355387 if : ${{ failure() }}
0 commit comments