Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1152aae
#RI-6325 - Fix e2e tests for SSH
egor-zalenski Nov 20, 2024
330143f
#RI-6325 - Fix e2e tests for SSH
egor-zalenski Nov 20, 2024
4fe1bd6
#RI-6325 - Fix e2e tests for SSH
egor-zalenski Nov 20, 2024
e55d709
#RI-6325 - Fix e2e tests for SSH
egor-zalenski Nov 20, 2024
34ac571
#RI-6325 - Fix e2e tests for SSH
egor-zalenski Nov 20, 2024
6172411
#RI-6325 - Fix e2e tests for SSH
egor-zalenski Nov 20, 2024
6a247d8
#RI-6325 - Fix e2e tests for SSH
egor-zalenski Nov 20, 2024
2ef88a4
#RI-6325 - Fix e2e tests for SSH
egor-zalenski Nov 22, 2024
74ed95c
#RI-6349 - Fix mas build
egor-zalenski Nov 22, 2024
701a613
#RI-6349 - Fix mas build
egor-zalenski Nov 22, 2024
11726f5
#RI-6349 - Fix mas build
egor-zalenski Nov 22, 2024
0a2030e
#RI-6349 - Fix mas build
egor-zalenski Nov 22, 2024
788c796
#RI-6349 - Fix mas build
egor-zalenski Nov 22, 2024
2587bea
#RI-6349 - Fix mas build
egor-zalenski Nov 22, 2024
6976b59
test
egor-zalenski Nov 22, 2024
d3ce57d
test
egor-zalenski Nov 22, 2024
53e68b3
test
egor-zalenski Nov 22, 2024
56520b8
#RI-6325 - Fix e2e
egor-zalenski Nov 22, 2024
3b9a51e
#RI-6325 - Fix e2e
egor-zalenski Nov 22, 2024
32b286e
#RI-6325 - Fix e2e
egor-zalenski Nov 22, 2024
811dd6b
test
egor-zalenski Nov 22, 2024
37b1608
#RI-6325 - Fix e2e
egor-zalenski Nov 22, 2024
8bfcbaf
#RI-6325 - Fix e2e
egor-zalenski Nov 22, 2024
329a082
#RI-6325 - Fix e2e
egor-zalenski Nov 24, 2024
d00d62a
#RI-6325 - Fix e2e
egor-zalenski Nov 24, 2024
77ce494
Merge branch 'refs/heads/be/feature/RI-6349_Fix_mas_build' into e2e/f…
egor-zalenski Nov 24, 2024
59b2b86
fix tests
egor-zalenski Nov 24, 2024
31ad5c5
fix tests
egor-zalenski Nov 24, 2024
b714b19
fix tests
egor-zalenski Nov 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions .github/workflows/pipeline-build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
default: 'staging'
type: string

only_docker:
description: Build only docker
for_e2e_tests:
description: Build for e2e docker tests
default: false
type: boolean

Expand Down Expand Up @@ -45,7 +45,16 @@ jobs:
run: ./.github/build/build.sh

# todo: matrix
- name: Build web archives for e2e tests
if: inputs.for_e2e_tests
run: |
unset npm_config_keytar_binary_host_mirror
unset npm_config_node_sqlite3_binary_host_mirror
# Docker sources
PLATFORM=linux ARCH=x64 LIBC=musl .github/build/build_modules.sh

- name: Build web archives
if: ${{ !inputs.for_e2e_tests }}
run: |
unset npm_config_keytar_binary_host_mirror
unset npm_config_node_sqlite3_binary_host_mirror
Expand All @@ -60,10 +69,8 @@ jobs:
PLATFORM=darwin ARCH=arm64 .github/build/build_modules.sh
# VSC Windows
PLATFORM=win32 ARCH=x64 .github/build/build_modules.sh
- name: Build Docker (x64, arm64)
env:
ENV: ${{ vars.ENV }}
RI_SEGMENT_WRITE_KEY: ${{ secrets.RI_SEGMENT_WRITE_KEY }}

- name: Build Docker (x64)
run: |
# Build alpine x64 image
docker buildx build \
Expand All @@ -75,6 +82,12 @@ jobs:
-t redisinsight:amd64 \
.

mkdir -p release/docker
docker image save -o release/docker/docker-linux-alpine.amd64.tar redisinsight:amd64

- name: Build Docker (arm64)
if: ${{ !inputs.for_e2e_tests }}
run: |
# Build alpine arm64 image
docker buildx build \
-f .github/build/build.Dockerfile \
Expand All @@ -86,7 +99,6 @@ jobs:
.

mkdir -p release/docker
docker image save -o release/docker/docker-linux-alpine.amd64.tar redisinsight:amd64
docker image save -o release/docker/docker-linux-alpine.arm64.tar redisinsight:arm64

- uses: actions/upload-artifact@v4
Expand All @@ -100,6 +112,7 @@ jobs:
./release/web-mini

env:
ENV: ${{ vars.ENV }}
RI_AI_CONVAI_TOKEN: ${{ secrets.RI_AI_CONVAI_TOKEN }}
RI_AI_QUERY_PASS: ${{ secrets.RI_AI_QUERY_PASS }}
RI_AI_QUERY_USER: ${{ secrets.RI_AI_QUERY_USER }}
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/pipeline-build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,10 @@ jobs:
echo $APP_BUNDLE_VERSION
echo $CSC_KEYCHAIN

yarn package:stage
yarn package:stage && yarn package:mas
rm -rf release/mac

# TODO: return MAS build
# yarn package:stage && yarn package:mas
# mv release/mas-universal/Redis-Insight-mac-universal-mas.pkg release/Redis-Insight-mac-universal-mas.pkg

mv release/mas-universal/Redis-Insight-mac-universal-mas.pkg release/Redis-Insight-mac-universal-mas.pkg

# handle manual builds
- name: Build macos dmg (custom)
Expand Down
38 changes: 11 additions & 27 deletions .github/workflows/tests-e2e-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@ jobs:
e2e-docker-tests:
runs-on: ubuntu-latest
name: E2E Docker tests
# environment:
# name: production
container:
image: docker:latest
options: --privileged
volumes:
- /usr/src/app/results:/usr/src/app/results
- /usr/src/app/report:/usr/src/app/report
strategy:
fail-fast: false
matrix:
Expand All @@ -50,9 +42,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup repository
run: git config --global --add safe.directory /__w/RedisInsight/RedisInsight

# SSH Debug
- name: Enable SSH
uses: mxschmitt/action-tmate@v3
Expand All @@ -74,6 +63,7 @@ jobs:
working-directory: ./tests/e2e
run: |
testFiles=$(find tests/web -type f -name '*.e2e.ts' | sort | awk "NR % 4 == ${{ matrix.parallel }}")

echo $testFiles

# Multi-Line value
Expand Down Expand Up @@ -117,23 +107,8 @@ jobs:
list-suites: 'failed'
fail-on-error: 'false'

- name: Add link to report in the workflow summary
if: always()
run: |
DATE=$(date +'%Y-%m-%d')
link="${{ vars.DEFAULT_TEST_REPORTS_URL }}/${DATE}/${{ github.run_id }}/${{ env.REPORT_NAME }}-${{ matrix.parallel }}/index.html"

echo "- [${link}](${link})" >> $GITHUB_STEP_SUMMARY

# Deploy report to AWS test bucket
deploy-report:
name: Deploy report
needs: 'e2e-docker-tests'
if: always()
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy report
if: always()
uses: ./.github/actions/deploy-test-reports
with:
group: 'report'
Expand All @@ -143,3 +118,12 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Add link to report in the workflow summary
if: always()
run: |
DATE=$(date +'%Y-%m-%d')
link="${{ vars.DEFAULT_TEST_REPORTS_URL }}/${DATE}/${{ github.run_id }}/${{ env.REPORT_NAME }}-${{ matrix.parallel }}/index.html"

echo "- [${link}](${link})" >> $GITHUB_STEP_SUMMARY


14 changes: 6 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ jobs:
redis_client: ${{ inputs.redis_client || '' }}
debug: ${{ inputs.debug || false }}

# E2E Approve
# # E2E Approve
e2e-approve:
runs-on: ubuntu-latest
needs: changes
timeout-minutes: 60
if: inputs.group_tests == 'all' || inputs.group_tests == 'only_e2e' || startsWith(github.ref_name, 'e2e/')
timeout-minutes: 60
environment: ${{ startsWith(github.ref_name, 'e2e/') && 'e2e-approve' || 'staging' }}
name: Approve E2E tests
steps:
Expand All @@ -124,7 +124,7 @@ jobs:
secrets: inherit
with:
debug: ${{ inputs.debug || false }}
only_docker: true
for_e2e_tests: true

e2e-docker-tests:
needs: build-docker
Expand All @@ -139,7 +139,7 @@ jobs:
needs: e2e-approve
secrets: inherit
with:
target: linux:appimage:x64
target: build_linux_appimage_x64
debug: ${{ inputs.debug || false }}

e2e-appimage-tests:
Expand All @@ -151,16 +151,14 @@ jobs:

clean:
uses: ./.github/workflows/clean-deployments.yml
if: always()
needs: [frontend-tests, backend-tests, integration-tests, e2e-docker-tests, e2e-appimage-tests]
if: ${{ !inputs.pre_release && always() }}

# Remove artifacts from github actions
remove-artifacts:
name: Remove artifacts
needs: [clean]
if: ${{ !inputs.pre_release && always() }}
needs: [frontend-tests, backend-tests, integration-tests, e2e-docker-tests, e2e-appimage-tests]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Remove all artifacts
Expand Down
4 changes: 1 addition & 3 deletions electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@
"node_modules",
"package.json"
],
"npmRebuild": false,
"artifactName": "Redis-Insight-${os}-${arch}.${ext}",
"compression": "normal",
"asarUnpack": [
"node_modules/keytar",
"node_modules/sqlite3",
"node_modules/cpu-features"
"node_modules/sqlite3"
],
"protocols": [{
"name": "RedisInsight",
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
"**/trim": "0.0.3",
"word-wrap": "1.2.4",
"**/semver": "^7.5.2",
"@electron/notarize": "2.5.0",
"rawproto/protobufjs": "^7.2.5",
"webpack-bundle-analyzer/ws": "^7.5.10",
"msw/path-to-regexp": "^6.3.0",
Expand Down
1 change: 1 addition & 0 deletions redisinsight/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"@nestjs/platform-socket.io/socket.io": "^4.8.0",
"@nestjs/cli/**/braces": "^3.0.3",
"**/semver": "^7.5.2",
"**/cpu-features": "file:./stubs/cpu-features",
"winston-daily-rotate-file/**/file-stream-rotator": "^1.0.0"
},
"dependencies": {
Expand Down
1 change: 1 addition & 0 deletions redisinsight/api/stubs/cpu-features/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
5 changes: 5 additions & 0 deletions redisinsight/api/stubs/cpu-features/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "cpu-features",
"version": "1.0.0",
"main": "index.js"
}
1 change: 1 addition & 0 deletions redisinsight/api/test/test-runs/test.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ RUN dbus-uuidgen > /var/lib/dbus/machine-id
WORKDIR /usr/src/app

COPY package.json yarn.lock ./
COPY stubs ./stubs
RUN yarn install
COPY . .

Expand Down
19 changes: 2 additions & 17 deletions redisinsight/api/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2626,11 +2626,6 @@ buffer@^6.0.3:
base64-js "^1.3.1"
ieee754 "^1.2.1"

buildcheck@~0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/buildcheck/-/buildcheck-0.0.6.tgz#89aa6e417cfd1e2196e3f8fe915eb709d2fe4238"
integrity sha512-8f9ZJCUXyT1M35Jx7MkBgmBMo3oHTTBIPLiY9xyL0pl3T5RwcPEY8cUHr5LBNfu/fk6c2T4DJZuVM/8ZZT2D2A==

busboy@^1.0.0, busboy@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893"
Expand Down Expand Up @@ -3213,13 +3208,8 @@ cosmiconfig@^8.2.0:
parse-json "^5.2.0"
path-type "^4.0.0"

cpu-features@~0.0.9:
version "0.0.9"
resolved "https://registry.yarnpkg.com/cpu-features/-/cpu-features-0.0.9.tgz#5226b92f0f1c63122b0a3eb84cb8335a4de499fc"
integrity sha512-AKjgn2rP2yJyfbepsmLfiYcmtNn/2eUvocUyM/09yB0YDiz39HteK/5/T4Onf0pmdYDMgkBoGvRLvEguzyL7wQ==
dependencies:
buildcheck "~0.0.6"
nan "^2.17.0"
"cpu-features@file:./stubs/cpu-features", cpu-features@~0.0.9:
version "1.0.0"

create-jest@^29.7.0:
version "29.7.0"
Expand Down Expand Up @@ -6446,11 +6436,6 @@ mz@^2.4.0:
object-assign "^4.0.1"
thenify-all "^1.0.0"

nan@^2.17.0:
version "2.17.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb"
integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==

nan@^2.18.0:
version "2.18.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.18.0.tgz#26a6faae7ffbeb293a39660e88a76b82e30b7554"
Expand Down
3 changes: 2 additions & 1 deletion redisinsight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
},
"resolutions": {
"**/semver": "^7.5.2",
"sqlite3/**/tar": "^6.2.1"
"sqlite3/**/tar": "^6.2.1",
"**/cpu-features": "file:./api/stubs/cpu-features"
},
"dependencies": {
"keytar": "^7.9.0",
Expand Down
32 changes: 11 additions & 21 deletions redisinsight/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,6 @@ buffer@^5.5.0:
base64-js "^1.3.1"
ieee754 "^1.1.13"

buildcheck@~0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/buildcheck/-/buildcheck-0.0.6.tgz#89aa6e417cfd1e2196e3f8fe915eb709d2fe4238"
integrity sha512-8f9ZJCUXyT1M35Jx7MkBgmBMo3oHTTBIPLiY9xyL0pl3T5RwcPEY8cUHr5LBNfu/fk6c2T4DJZuVM/8ZZT2D2A==

cacache@^15.2.0:
version "15.3.0"
resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.3.0.tgz#dc85380fb2f556fe3dda4c719bfa0ec875a7f1eb"
Expand Down Expand Up @@ -188,13 +183,8 @@ console-control-strings@^1.1.0:
resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==

cpu-features@~0.0.9:
version "0.0.10"
resolved "https://registry.yarnpkg.com/cpu-features/-/cpu-features-0.0.10.tgz#9aae536db2710c7254d7ed67cb3cbc7d29ad79c5"
integrity sha512-9IkYqtX3YHPCzoVg1Py+o9057a3i0fp7S530UWokCSaFVTc7CwXPRiOjRjBQQ18ZCNafx78YfnG+HALxtVmOGA==
dependencies:
buildcheck "~0.0.6"
nan "^2.19.0"
"cpu-features@file:./api/stubs/cpu-features", cpu-features@~0.0.10:
version "1.0.0"

debug@4, debug@^4.3.3:
version "4.3.4"
Expand Down Expand Up @@ -557,10 +547,10 @@ ms@^2.0.0:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==

nan@^2.18.0, nan@^2.19.0:
version "2.20.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.20.0.tgz#08c5ea813dd54ed16e5bd6505bf42af4f7838ca3"
integrity sha512-bk3gXBZDGILuuo/6sKtr0DQmSThYHLtNCdSdXk9YkxD/jK6X2vmCyyXBBxyqZ4XcnzTyYEAThfX3DCEnLf6igw==
nan@^2.20.0:
version "2.22.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.22.0.tgz#31bc433fc33213c97bad36404bb68063de604de3"
integrity sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw==

napi-build-utils@^1.0.1:
version "1.0.2"
Expand Down Expand Up @@ -810,15 +800,15 @@ [email protected]:
node-gyp "8.x"

ssh2@^1.15.0:
version "1.15.0"
resolved "https://registry.yarnpkg.com/ssh2/-/ssh2-1.15.0.tgz#2f998455036a7f89e0df5847efb5421748d9871b"
integrity sha512-C0PHgX4h6lBxYx7hcXwu3QWdh4tg6tZZsTfXcdvc5caW/EMxaB4H9dWsl7qk+F7LAW762hp8VbXOX7x4xUYvEw==
version "1.16.0"
resolved "https://registry.yarnpkg.com/ssh2/-/ssh2-1.16.0.tgz#79221d40cbf4d03d07fe881149de0a9de928c9f0"
integrity sha512-r1X4KsBGedJqo7h8F5c4Ybpcr5RjyP+aWIG007uBPRjmdQWfEiVLzSK71Zji1B9sKxwaCvD8y8cwSkYrlLiRRg==
dependencies:
asn1 "^0.2.6"
bcrypt-pbkdf "^1.0.2"
optionalDependencies:
cpu-features "~0.0.9"
nan "^2.18.0"
cpu-features "~0.0.10"
nan "^2.20.0"

ssri@^8.0.0, ssri@^8.0.1:
version "8.0.1"
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/docker.web.docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ services:
RI_ENCRYPTION_KEY: $E2E_RI_ENCRYPTION_KEY
RI_SERVER_TLS_CERT: $RI_SERVER_TLS_CERT
RI_SERVER_TLS_KEY: $RI_SERVER_TLS_KEY
RI_STDOUT_LOGGER: 'false'
volumes:
- rihomedir:/data
- tmp:/tmp
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/web.runner.ci.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import testcafe from 'testcafe';
experimentalDecorators: true
} })
.src((process.env.TEST_FILES || 'tests/web/**/*.e2e.ts').split('\n'))
.browsers(['chromium:headless --cache --allow-insecure-localhost --disable-search-engine-choice-screen --ignore-certificate-errors'])
.browsers(['firefox:headless --disable-search-engine-choice-screen --ignore-certificate-errors'])
.screenshots({
path: 'report/screenshots/',
takeOnFails: true,
Expand All @@ -34,7 +34,7 @@ import testcafe from 'testcafe';
])
.run({
skipJsErrors: true,
browserInitTimeout: 120000,
browserInitTimeout: 240000,
selectorTimeout: 5000,
assertionTimeout: 5000,
speed: 1,
Expand Down
Loading
Loading