Skip to content

Commit fe5d323

Browse files
authored
Merge branch 'master' into dependabot/npm_and_yarn/sass-1.89.2
2 parents 588a28a + 55c868d commit fe5d323

File tree

4 files changed

+71
-138
lines changed

4 files changed

+71
-138
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -242,92 +242,14 @@ jobs:
242242
/sbin/my_init &
243243
node bin/scripts/test.connection.js
244244
npx grunt mochaTest
245-
ui-test-dashboard:
246-
runs-on: ubuntu-22.04-4core
247-
248-
services:
249-
mongodb:
250-
image: mongo:8.0
251-
options: >-
252-
--health-cmd mongosh
253-
--health-interval 10s
254-
--health-timeout 5s
255-
--health-retries 5
256-
ports:
257-
- 27017:27017
258-
259-
container:
260-
image: countly/countly-core:pipelines-${{ inputs.custom_tag || github.base_ref || github.ref_name }}
261-
env:
262-
COUNTLY_CONFIG__MONGODB_HOST: mongodb
263-
COUNTLY_CONFIG_API_PREVENT_JOBS: true
264245
265-
steps:
266-
- uses: actions/checkout@v4
267-
268-
- name: Install Chrome
269-
shell: bash
270-
run: |
271-
apt update
272-
apt install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb wget
273-
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -O /tmp/chrome.deb
274-
apt install -y /tmp/chrome.deb
275-
276-
- name: Copy code
277-
shell: bash
278-
run: cp -rf ./* /opt/countly
279-
280-
- name: Prepare files to use correct MongoDB host
281-
shell: bash
282-
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"
283-
284-
- name: NPM install
285-
shell: bash
286-
working-directory: /opt/countly
287-
run: npm install
288-
289-
- name: Prepare environment
290-
shell: bash
291-
working-directory: /opt/countly
292-
run: |
293-
sed -i 's/port: 3001,/port: 3001, workers: 1,/' /opt/countly/api/config.js
294-
cp "./plugins/plugins.default.json" "/opt/countly/plugins/plugins.json"
295-
npm install
296-
sudo countly task dist-all
297-
bash bin/backup/import_events.sh
298-
bash bin/scripts/countly.prepare.ce.tests.sh
299-
countly add_user '${{ secrets.CYPRESS_USER_EMAIL }}' '${{ secrets.CYPRESS_USER_PASSWORD }}'
300-
mongosh --host mongodb --eval 'db.getSiblingDB("countly").members.updateOne({username: "${{ secrets.CYPRESS_USER_EMAIL }}"}, {$set: {username: "${{ secrets.CYPRESS_USER_USERNAME }}", subscribe_newsletter: true}});'
301-
mongosh --host mongodb --eval 'db.getSiblingDB("countly").plugins.updateOne({_id: "plugins"}, {$set: {"frontend.countly_tracking": true}});'
302-
cd ui-tests
303-
echo '{"username": "${{ secrets.CYPRESS_USER_USERNAME }}","email": "${{ secrets.CYPRESS_USER_EMAIL }}","password": "${{ secrets.CYPRESS_USER_PASSWORD }}"}' > cypress/fixtures/user.json
304-
sed -i 's/00000000-0000-0000-0000-000000000000/${{ secrets.CYPRESS_KEY }}/g' package.json
305-
cp cypress.config.sample.js cypress.config.js
306-
sed -i 's/000000/${{ secrets.CYPRESS_PROJECT_ID }}/g' cypress.config.js
307-
308-
- name: Run UI tests
309-
shell: bash
310-
working-directory: /opt/countly
311-
run: |
312-
/sbin/my_init &
313-
cd ui-tests
314-
npm install
315-
xvfb-run --auto-servernum --server-args="-screen 0 1280x1024x24" \
316-
npm run cy:run:dashboard
317-
318-
- name: Upload UI tests artifacts
319-
if: ${{ failure() }}
320-
shell: bash
321-
working-directory: /opt/countly/ui-tests/cypress
322-
run: |
323-
ARTIFACT_ARCHIVE_NAME="$(date '+%Y%m%d-%H.%M')_${GITHUB_REPOSITORY#*/}_CI#${{ github.run_number }}.tar.gz"
324-
mkdir -p screenshots videos
325-
tar zcvf "$ARTIFACT_ARCHIVE_NAME" screenshots videos
326-
curl -o /tmp/uploader.log -u "${{ secrets.BOX_UPLOAD_AUTH }}" ${{ secrets.BOX_UPLOAD_PATH }} -T "$ARTIFACT_ARCHIVE_NAME"
327-
328-
ui-test-onboarding:
246+
ui-tests:
329247
runs-on: ubuntu-22.04-4core
330248

249+
strategy:
250+
matrix:
251+
test_type: [dashboard, onboarding]
252+
331253
services:
332254
mongodb:
333255
image: mongo:8.0
@@ -377,7 +299,13 @@ jobs:
377299
cp "./plugins/plugins.default.json" "/opt/countly/plugins/plugins.json"
378300
npm install
379301
sudo countly task dist-all
302+
bash bin/backup/import_events.sh
380303
bash bin/scripts/countly.prepare.ce.tests.sh
304+
if [ "${{ matrix.test_type }}" = "dashboard" ]; then
305+
countly add_user '${{ secrets.CYPRESS_USER_EMAIL }}' '${{ secrets.CYPRESS_USER_PASSWORD }}'
306+
mongosh --host mongodb --eval 'db.getSiblingDB("countly").members.updateOne({username: "${{ secrets.CYPRESS_USER_EMAIL }}"}, {$set: {username: "${{ secrets.CYPRESS_USER_USERNAME }}", subscribe_newsletter: true}});'
307+
mongosh --host mongodb --eval 'db.getSiblingDB("countly").plugins.updateOne({_id: "plugins"}, {$set: {"frontend.countly_tracking": true}});'
308+
fi
381309
cd ui-tests
382310
echo '{"username": "${{ secrets.CYPRESS_USER_USERNAME }}","email": "${{ secrets.CYPRESS_USER_EMAIL }}","password": "${{ secrets.CYPRESS_USER_PASSWORD }}"}' > cypress/fixtures/user.json
383311
sed -i 's/00000000-0000-0000-0000-000000000000/${{ secrets.CYPRESS_KEY }}/g' package.json
@@ -391,15 +319,18 @@ jobs:
391319
/sbin/my_init &
392320
cd ui-tests
393321
npm install
394-
xvfb-run --auto-servernum --server-args="-screen 0 1280x1024x24" \
395-
npm run cy:run:onboarding
322+
if [ "${{ matrix.test_type }}" = "dashboard" ]; then
323+
xvfb-run --auto-servernum --server-args="-screen 0 1280x1024x24" npm run cy:run:dashboard
324+
else
325+
xvfb-run --auto-servernum --server-args="-screen 0 1280x1024x24" npm run cy:run:onboarding
326+
fi
396327
397328
- name: Upload UI tests artifacts
398329
if: ${{ failure() }}
399330
shell: bash
400331
working-directory: /opt/countly/ui-tests/cypress
401332
run: |
402-
ARTIFACT_ARCHIVE_NAME="$(date '+%Y%m%d-%H.%M')_${GITHUB_REPOSITORY#*/}_CI#${{ github.run_number }}.tar.gz"
333+
ARTIFACT_ARCHIVE_NAME="$(date '+%Y%m%d-%H.%M')_${GITHUB_REPOSITORY#*/}_CI#${{ github.run_number }}_${{ matrix.test_type }}.tar.gz"
403334
mkdir -p screenshots videos
404335
tar zcvf "$ARTIFACT_ARCHIVE_NAME" screenshots videos
405336
curl -o /tmp/uploader.log -u "${{ secrets.BOX_UPLOAD_AUTH }}" ${{ secrets.BOX_UPLOAD_PATH }} -T "$ARTIFACT_ARCHIVE_NAME"

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## Version 25.03.X
2+
Enterprise Fixes:
3+
- [active-users] Fixed bug related to selecting calculation ranges. As a result, some dates were previously calculated on incomplete data set.
4+
5+
16
## Version 25.03.6
27
Enterprise Features:
38
- [journey_engine] Publish toggle is converted into button and rearranged
@@ -4732,4 +4737,4 @@ This version provides several features and bugfixes to both server and SDKs. The
47324737
admin or user. An admin of an application can edit application settings.
47334738
A user of an application can only view analytics for that application
47344739
and cannot edit its settings.
4735-
* Added csfr protection to all methods provided through app.js.
4740+
* Added csfr protection to all methods provided through app.js.

0 commit comments

Comments
 (0)