Skip to content

Commit ed588ea

Browse files
authored
Merge branch 'next' into QT-162v2
2 parents 5e4fa73 + 1334169 commit ed588ea

File tree

1,671 files changed

+105592
-62309
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,671 files changed

+105592
-62309
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ root = true
44
end_of_line = lf
55
insert_final_newline = false
66

7-
[*.{js,html}]
7+
[*.{js,html,scss,json}]
88
indent_style = space
99
indent_size = 4

.eslintrc.json

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
},
136136
"env": {
137137
"browser": true,
138-
"es6": true
138+
"es2020": true
139139
},
140140
"rules": {
141141
"valid-jsdoc": [
@@ -208,11 +208,11 @@
208208
],
209209
"excludedFiles": "plugins/*/frontend/public/**/*.js",
210210
"env": {
211-
"es6": true,
211+
"es2020": true,
212212
"node": true
213213
},
214214
"parserOptions": {
215-
"ecmaVersion": 2020
215+
"ecmaVersion": 2023
216216
},
217217
"rules": {
218218
"no-console": "off",
@@ -237,9 +237,6 @@
237237
"for-direction": [
238238
"off"
239239
],
240-
"no-console": [
241-
"off"
242-
],
243240
"no-control-regex": [
244241
"off"
245242
],
@@ -288,7 +285,7 @@
288285
],
289286
"excludedFiles": "plugins/*/tests.js",
290287
"env": {
291-
"es6": true,
288+
"es2020": true,
292289
"node": true
293290
},
294291
"parserOptions": {
@@ -305,7 +302,7 @@
305302
"plugins/*/tests.js"
306303
],
307304
"env": {
308-
"es6": true,
305+
"es2020": true,
309306
"node": true,
310307
"mocha": true
311308
},
@@ -324,7 +321,7 @@
324321
"ui-tests/**/*.js"
325322
],
326323
"env": {
327-
"es6": true,
324+
"es2020": true,
328325
"node": true,
329326
"mocha": true
330327
},
@@ -343,4 +340,4 @@
343340
}
344341
}
345342
]
346-
}
343+
}

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ updates:
202202
interval: daily
203203
open-pull-requests-limit: 10
204204
reviewers:
205-
- iartem
205+
- cihadtekin
206206
assignees:
207-
- iartem
207+
- cihadtekin
208208
labels:
209209
- dependencies
210210
versioning-strategy: increase-if-necessary

.github/workflows/deploy.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,22 @@ jobs:
4040
env:
4141
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4242
run: bash ./bin/scripts/generateDocs.sh
43+
push_all:
44+
name: Push Countly Test Image
45+
runs-on: ubuntu-latest
46+
steps:
47+
- name: Check out the repo
48+
uses: actions/checkout@v2
49+
50+
- name: Log in to Docker Hub
51+
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
52+
with:
53+
username: ${{ secrets.DOCKERHUB_USERNAME }}
54+
password: ${{ secrets.DOCKERHUB_TOKEN }}
55+
56+
- name: Build and push Docker image
57+
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
58+
with:
59+
push: true
60+
file: ./Dockerfile-core
61+
tags: countly/countly-core:pipelines-${{ github.base_ref || github.ref_name }}

.github/workflows/docker-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,4 @@ jobs:
129129
with:
130130
push: true
131131
file: ./Dockerfile-core
132-
tags: countly/countly-core:latest,countly/countly-core:${{ steps.vars.outputs.tag }}
132+
tags: countly/countly-core:latest,countly/countly-core:${{ steps.vars.outputs.tag }},countly/countly-core:pipelines-${{ github.base_ref || github.ref_name }}

.github/workflows/main.yml

Lines changed: 47 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ on:
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
1520
jobs:
@@ -64,7 +69,7 @@ jobs:
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
@@ -74,9 +79,10 @@ jobs:
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
@@ -99,7 +105,7 @@ jobs:
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() }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,5 @@ frontend/express/public/stylesheets/styles/manifest.css.map
4242
frontend/express/public/stylesheets/vue/clyvue.css.map
4343
log/
4444
log/supervisord/
45-
plugins/plugins.json.*
45+
plugins/plugins.json.*
46+
.sdk

0 commit comments

Comments
 (0)