Skip to content

Commit 1c94dfb

Browse files
committed
Merge branch 'feature/RI-6265_update-list-of-databases' into e2e/feature/RI-6268_enhance-form-to-add-database-connections
2 parents e7a9a83 + 4f1a522 commit 1c94dfb

File tree

53 files changed

+461
-206
lines changed

Some content is hidden

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

53 files changed

+461
-206
lines changed

.github/e2e/test.app-image.sh

Lines changed: 8 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,52 +3,21 @@ set -e
33

44
yarn --cwd tests/e2e install
55

6-
# Create the ri-test directory if it doesn't exist
7-
mkdir -p ri-test
8-
9-
# Extract the AppImage
6+
# mount app resources
107
chmod +x ./release/*.AppImage
11-
./release/*.AppImage --appimage-extract
12-
13-
# Move contents of squashfs-root to ri-test and remove squashfs-root folder
14-
mv squashfs-root/* ri-test/
15-
rm -rf squashfs-root
16-
17-
# Export custom XDG_DATA_DIRS with ri-test
18-
export XDG_DATA_DIRS="$(pwd)/ri-test:$XDG_DATA_DIRS"
8+
./release/*.AppImage --appimage-mount >> apppath &
199

2010
# create folder before tests run to prevent permissions issue
2111
mkdir -p tests/e2e/remote
2212
mkdir -p tests/e2e/rdi
2313

24-
# Create a custom .desktop file for RedisInsight
25-
cat > ri-test/redisinsight.desktop <<EOL
26-
[Desktop Entry]
27-
Version=1.0
28-
Name=RedisInsight
29-
Exec=$(pwd)/ri-test/redisinsight %u
30-
Icon=$(pwd)/ri-test/resources/app.asar/img/icon.png
31-
Type=Application
32-
Terminal=false
33-
MimeType=x-scheme-handler/redisinsight;
34-
EOL
35-
36-
# Copy the .desktop file to the local applications directory
37-
cp ri-test/redisinsight.desktop "$HOME/.local/share/applications"
38-
39-
# Update the desktop database with custom directory
40-
update-desktop-database "$(pwd)/ri-test/"
41-
42-
# Register the RedisInsight deeplink protocol
43-
xdg-mime default redisinsight.desktop x-scheme-handler/redisinsight
44-
45-
# Run rte
46-
docker-compose -f tests/e2e/rte.docker-compose.yml build
47-
docker-compose -f tests/e2e/rte.docker-compose.yml up --force-recreate -d -V
14+
# run rte
15+
docker compose -f tests/e2e/rte.docker-compose.yml build
16+
docker compose -f tests/e2e/rte.docker-compose.yml up --force-recreate -d -V
4817
./tests/e2e/wait-for-redis.sh localhost 12000 && \
4918

50-
# Run tests
51-
COMMON_URL=$(pwd)/ri-test/resources/app.asar/dist/renderer/index.html \
52-
ELECTRON_PATH=$(pwd)/ri-test/redisinsight \
19+
# run tests
20+
COMMON_URL=$(tail -n 1 apppath)/resources/app.asar/dist/renderer/index.html \
21+
ELECTRON_PATH=$(tail -n 1 apppath)/redisinsight \
5322
RI_SOCKETS_CORS=true \
5423
yarn --cwd tests/e2e dotenv -e .desktop.env yarn --cwd tests/e2e test:desktop:ci

.github/e2e/test.app-image.sso.sh

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/bin/bash
2+
set -e
3+
4+
yarn --cwd tests/e2e install
5+
6+
# Create the ri-test directory if it doesn't exist
7+
mkdir -p ri-test
8+
9+
# Extract the AppImage
10+
chmod +x ./release/*.AppImage
11+
./release/*.AppImage --appimage-extract
12+
13+
# Move contents of squashfs-root to ri-test and remove squashfs-root folder
14+
mv squashfs-root/* ri-test/
15+
rm -rf squashfs-root
16+
17+
# Export custom XDG_DATA_DIRS with ri-test
18+
export XDG_DATA_DIRS="$(pwd)/ri-test:$XDG_DATA_DIRS"
19+
20+
# create folder before tests run to prevent permissions issue
21+
mkdir -p tests/e2e/remote
22+
mkdir -p tests/e2e/rdi
23+
24+
# Create a custom .desktop file for RedisInsight
25+
cat > ri-test/redisinsight.desktop <<EOL
26+
[Desktop Entry]
27+
Version=1.0
28+
Name=RedisInsight
29+
Exec=$(pwd)/ri-test/redisinsight %u
30+
Icon=$(pwd)/ri-test/resources/app.asar/img/icon.png
31+
Type=Application
32+
Terminal=false
33+
MimeType=x-scheme-handler/redisinsight;
34+
EOL
35+
36+
# Copy the .desktop file to the local applications directory
37+
cp ri-test/redisinsight.desktop "$HOME/.local/share/applications"
38+
39+
# Update the desktop database with custom directory
40+
update-desktop-database "$(pwd)/ri-test/"
41+
42+
# Register the RedisInsight deeplink protocol
43+
xdg-mime default redisinsight.desktop x-scheme-handler/redisinsight
44+
45+
# Run rte
46+
docker compose -f tests/e2e/rte.docker-compose.yml build
47+
docker compose -f tests/e2e/rte.docker-compose.yml up --force-recreate -d -V
48+
./tests/e2e/wait-for-redis.sh localhost 12000 && \
49+
50+
# Run tests
51+
COMMON_URL=$(pwd)/ri-test/resources/app.asar/dist/renderer/index.html \
52+
ELECTRON_PATH=$(pwd)/ri-test/redisinsight \
53+
RI_SOCKETS_CORS=true \
54+
yarn --cwd tests/e2e dotenv -e .desktop.env yarn --cwd tests/e2e test:desktop:ci

.github/workflows/manual-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ on:
4949
environment:
5050
description: Environment to run build
5151
type: environment
52-
default: 'staging'
52+
default: 'development'
5353
required: false
5454

5555
debug:

.github/workflows/pipeline-build-linux.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,12 @@ jobs:
6666
if: (vars.ENV == 'staging' || vars.ENV == 'development') && inputs.target == vars.ALL
6767
run: yarn package:stage
6868

69-
- name: Build linux packages (development)
69+
- name: Build linux packages (custom)
7070
if: inputs.target != vars.ALL
7171
run: |
72-
target=""
73-
if [ ${{ startsWith(inputs.target, 'linux:') }} == 'true' ]; then
74-
inputsTarget=${{inputs.target}}
75-
target=${inputsTarget#linux:}
76-
fi
72+
target=$(echo "${{inputs.target}}" | grep -oE 'build_linux_[^_ ]+' | sed 's/build_linux_//' | sort -u | paste -sd ' ' -)
7773
78-
if [ ${{ contains(vars.ENV, 'production') }} ]; then
74+
if [ "${{ vars.ENV == 'production' }}" == "true" ]; then
7975
yarn package:prod --linux $target
8076
else
8177
yarn package:stage --linux $target
@@ -97,6 +93,7 @@ jobs:
9793
RI_AI_QUERY_PASS: ${{ secrets.RI_AI_QUERY_PASS }}
9894
RI_AI_QUERY_USER: ${{ secrets.RI_AI_QUERY_USER }}
9995
RI_CLOUD_API_URL: ${{ secrets.RI_CLOUD_API_URL }}
96+
RI_CLOUD_API_TOKEN: ${{ secrets.RI_CLOUD_API_TOKEN }}
10097
RI_CLOUD_CAPI_URL: ${{ secrets.RI_CLOUD_CAPI_URL }}
10198
RI_CLOUD_IDP_AUTHORIZE_URL: ${{ secrets.RI_CLOUD_IDP_AUTHORIZE_URL }}
10299
RI_CLOUD_IDP_CLIENT_ID: ${{ secrets.RI_CLOUD_IDP_CLIENT_ID }}

.github/workflows/pipeline-build-macos.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,13 @@ jobs:
7676
mv release/mas-universal/Redis-Insight-mac-universal-mas.pkg release/Redis-Insight-mac-universal-mas.pkg
7777
7878
# handle manual builds
79-
- name: Build macos dmg (dev)
79+
- name: Build macos dmg (custom)
8080
if: inputs.target != vars.ALL
8181
run: |
8282
unset CSC_LINK
83-
target=""
83+
target=$(echo "${{inputs.target}}" | grep -oE 'build_macos_[^ ]+' | sed 's/build_macos_/dmg:/' | paste -sd ' ' -)
8484
85-
if [ ${{ startsWith(inputs.target, 'macos:') }} == 'true' ]; then
86-
inputsTarget=${{inputs.target}}
87-
target=--${inputsTarget#macos:}
88-
fi
89-
90-
if [ ${{ contains(vars.ENV, 'production') }} ]; then
85+
if [ "${{ vars.ENV == 'production' }}" == "true" ]; then
9186
yarn package:prod --mac $target
9287
else
9388
yarn package:stage --mac $target
@@ -127,6 +122,7 @@ jobs:
127122
RI_AI_CONVAI_TOKEN: ${{ secrets.RI_AI_CONVAI_TOKEN }}
128123
RI_AI_QUERY_PASS: ${{ secrets.RI_AI_QUERY_PASS }}
129124
RI_AI_QUERY_USER: ${{ secrets.RI_AI_QUERY_USER }}
125+
RI_CLOUD_API_TOKEN: ${{ secrets.RI_CLOUD_API_TOKEN }}
130126
RI_CLOUD_API_URL: ${{ secrets.RI_CLOUD_API_URL }}
131127
RI_CLOUD_CAPI_URL: ${{ secrets.RI_CLOUD_CAPI_URL }}
132128
RI_CLOUD_IDP_AUTHORIZE_URL: ${{ secrets.RI_CLOUD_IDP_AUTHORIZE_URL }}

.github/workflows/pipeline-build-windows.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ jobs:
6969
RI_AI_QUERY_PASS: ${{ secrets.RI_AI_QUERY_PASS }}
7070
RI_AI_QUERY_USER: ${{ secrets.RI_AI_QUERY_USER }}
7171
RI_CLOUD_API_URL: ${{ secrets.RI_CLOUD_API_URL }}
72+
RI_CLOUD_API_TOKEN: ${{ secrets.RI_CLOUD_API_TOKEN }}
7273
RI_CLOUD_CAPI_URL: ${{ secrets.RI_CLOUD_CAPI_URL }}
7374
RI_CLOUD_IDP_AUTHORIZE_URL: ${{ secrets.RI_CLOUD_IDP_AUTHORIZE_URL }}
7475
RI_CLOUD_IDP_CLIENT_ID: ${{ secrets.RI_CLOUD_IDP_CLIENT_ID }}

.github/workflows/tests-e2e-docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
fail-fast: false
4646
matrix:
4747
# Number of threads to run tests
48-
parallel: [0, 1, 2]
48+
parallel: [0, 1, 2, 3]
4949

5050
steps:
5151
- uses: actions/checkout@v4
@@ -73,7 +73,7 @@ jobs:
7373
- name: Generate short list of the test files
7474
working-directory: ./tests/e2e
7575
run: |
76-
testFiles=$(find tests/web -type f -name '*.e2e.ts' | sort | awk "NR % 3 == ${{ matrix.parallel }}")
76+
testFiles=$(find tests/web -type f -name '*.e2e.ts' | sort | awk "NR % 4 == ${{ matrix.parallel }}")
7777
echo $testFiles
7878
7979
# Multi-Line value

.github/workflows/tests-integration.yml

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -151,32 +151,11 @@ jobs:
151151
list-suites: 'failed'
152152
fail-on-error: 'false'
153153

154-
- uses: cloudposse/github-action-matrix-outputs-write@v1
155-
id: out
156-
with:
157-
matrix-step-name: ${{ github.job }}
158-
matrix-key: ${{ matrix.rte }}
159-
outputs: |-
160-
link: ${{ steps.test-reporter.outputs.url_html }}
161-
162-
# - name: Add link to report in the workflow summary
163-
# if: always()
164-
# run: |
165-
# link="${{ steps.test-reporter.outputs.url_html }}"
166-
# echo "- [${link}](${link})" >> $GITHUB_STEP_SUMMARY
167-
168-
## Read matrix outputs
169-
read:
170-
runs-on: ubuntu-latest
171-
needs: [run-tests]
172-
steps:
173-
- uses: cloudposse/github-action-matrix-outputs-read@v1
174-
id: read
175-
with:
176-
matrix-step-name: run-tests
177-
178-
outputs:
179-
result: "${{ steps.read.outputs.result }}"
154+
- name: Add link to report in the workflow summary
155+
if: always()
156+
run: |
157+
link="${{ steps.test-reporter.outputs.url_html }}"
158+
echo "- [${link}](${link})" >> $GITHUB_STEP_SUMMARY
180159
181160
coverage:
182161
runs-on: ubuntu-latest

.github/workflows/tests.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,20 @@ on:
1717
- all
1818
- without_e2e
1919
- only_e2e
20+
2021
redis_client:
2122
description: Library to use for redis connection
2223
default: 'ioredis'
2324
type: choice
2425
options:
2526
- ioredis
2627
- node-redis
28+
29+
short_rte_list:
30+
description: Use short RTE list for IT
31+
type: boolean
32+
default: true
33+
2734
debug:
2835
description: Enable SSH Debug (IT and E2E)
2936
default: false

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
"**/trim": "0.0.3",
7979
"word-wrap": "1.2.4",
8080
"**/semver": "^7.5.2",
81+
"@electron/notarize": "2.3.2",
8182
"rawproto/protobufjs": "^7.2.5",
8283
"webpack-bundle-analyzer/ws": "^7.5.10",
8384
"msw/path-to-regexp": "^6.3.0",

0 commit comments

Comments
 (0)