Skip to content

Commit 329a082

Browse files
committed
#RI-6325 - Fix e2e
1 parent 8bfcbaf commit 329a082

File tree

3 files changed

+80
-92
lines changed

3 files changed

+80
-92
lines changed

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

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77
default: 'staging'
88
type: string
99

10-
only_docker:
11-
description: Build only docker
10+
for_e2e_tests:
11+
description: Build for e2e docker tests
1212
default: false
1313
type: boolean
1414

@@ -45,7 +45,16 @@ jobs:
4545
run: ./.github/build/build.sh
4646

4747
# todo: matrix
48+
- name: Build web archives for e2e tests
49+
if: inputs.for_e2e_tests
50+
run: |
51+
unset npm_config_keytar_binary_host_mirror
52+
unset npm_config_node_sqlite3_binary_host_mirror
53+
# Docker sources
54+
PLATFORM=linux ARCH=x64 LIBC=musl .github/build/build_modules.sh
55+
4856
- name: Build web archives
57+
if: ${{ !inputs.for_e2e_tests }}
4958
run: |
5059
unset npm_config_keytar_binary_host_mirror
5160
unset npm_config_node_sqlite3_binary_host_mirror
@@ -60,10 +69,8 @@ jobs:
6069
PLATFORM=darwin ARCH=arm64 .github/build/build_modules.sh
6170
# VSC Windows
6271
PLATFORM=win32 ARCH=x64 .github/build/build_modules.sh
63-
- name: Build Docker (x64, arm64)
64-
env:
65-
ENV: ${{ vars.ENV }}
66-
RI_SEGMENT_WRITE_KEY: ${{ secrets.RI_SEGMENT_WRITE_KEY }}
72+
73+
- name: Build Docker (x64)
6774
run: |
6875
# Build alpine x64 image
6976
docker buildx build \
@@ -75,6 +82,12 @@ jobs:
7582
-t redisinsight:amd64 \
7683
.
7784
85+
mkdir -p release/docker
86+
docker image save -o release/docker/docker-linux-alpine.amd64.tar redisinsight:amd64
87+
88+
- name: Build Docker (arm64)
89+
if: ${{ !inputs.for_e2e_tests }}
90+
run: |
7891
# Build alpine arm64 image
7992
docker buildx build \
8093
-f .github/build/build.Dockerfile \
@@ -86,7 +99,6 @@ jobs:
8699
.
87100
88101
mkdir -p release/docker
89-
docker image save -o release/docker/docker-linux-alpine.amd64.tar redisinsight:amd64
90102
docker image save -o release/docker/docker-linux-alpine.arm64.tar redisinsight:arm64
91103
92104
- uses: actions/upload-artifact@v4
@@ -100,6 +112,7 @@ jobs:
100112
./release/web-mini
101113
102114
env:
115+
ENV: ${{ vars.ENV }}
103116
RI_AI_CONVAI_TOKEN: ${{ secrets.RI_AI_CONVAI_TOKEN }}
104117
RI_AI_QUERY_PASS: ${{ secrets.RI_AI_QUERY_PASS }}
105118
RI_AI_QUERY_USER: ${{ secrets.RI_AI_QUERY_USER }}

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

Lines changed: 16 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -50,44 +50,28 @@ jobs:
5050
steps:
5151
- uses: actions/checkout@v4
5252

53-
- name: Setup repository
54-
run: git config --global --add safe.directory /__w/RedisInsight/RedisInsight
55-
56-
# - name: Setup Python
57-
# uses: actions/setup-python@v5
58-
# with:
59-
# python-version: '3.11'
60-
6153
# SSH Debug
6254
- name: Enable SSH
6355
uses: mxschmitt/action-tmate@v3
6456
if: inputs.debug
6557
with:
6658
detached: true
6759

68-
# - name: Download Docker Artifacts
69-
# uses: actions/download-artifact@v4
70-
# with:
71-
# name: docker-builds
72-
# path: ./release
60+
- name: Download Docker Artifacts
61+
uses: actions/download-artifact@v4
62+
with:
63+
name: docker-builds
64+
path: ./release
7365

7466
- name: Load built docker image from workspace
7567
run: |
76-
# docker image load -i ./release/docker/docker-linux-alpine.amd64.tar
77-
78-
OUTPUT_FILE="docker-linux-alpine.amd64.tar"
79-
FILE_URL="https://s3.us-east-1.amazonaws.com/redisinsight.test/public/pre-release/2.62.0/docker/${OUTPUT_FILE}"
80-
81-
wget -O "$OUTPUT_FILE" "$FILE_URL"
82-
83-
docker image load -i ./docker-linux-alpine.amd64.tar
68+
docker image load -i ./release/docker/docker-linux-alpine.amd64.tar
8469
8570
- name: Generate short list of the test files
8671
working-directory: ./tests/e2e
8772
run: |
8873
testFiles=$(find tests/web -type f -name '*.e2e.ts' | sort | awk "NR % 4 == ${{ matrix.parallel }}")
8974
90-
# testFiles=tests/web/critical-path/database/connecting-to-the-db.e2e.ts
9175
echo $testFiles
9276
9377
# Multi-Line value
@@ -131,23 +115,8 @@ jobs:
131115
list-suites: 'failed'
132116
fail-on-error: 'false'
133117

134-
- name: Add link to report in the workflow summary
135-
if: always()
136-
run: |
137-
DATE=$(date +'%Y-%m-%d')
138-
link="${{ vars.DEFAULT_TEST_REPORTS_URL }}/${DATE}/${{ github.run_id }}/${{ env.REPORT_NAME }}-${{ matrix.parallel }}/index.html"
139-
140-
echo "- [${link}](${link})" >> $GITHUB_STEP_SUMMARY
141-
142-
# Deploy report to AWS test bucket
143-
deploy-report:
144-
name: Deploy report
145-
needs: 'e2e-docker-tests'
146-
if: always()
147-
runs-on: ubuntu-latest
148-
steps:
149-
- uses: actions/checkout@v4
150118
- name: Deploy report
119+
if: always()
151120
uses: ./.github/actions/deploy-test-reports
152121
with:
153122
group: 'report'
@@ -157,3 +126,12 @@ jobs:
157126
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
158127
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
159128

129+
- name: Add link to report in the workflow summary
130+
if: always()
131+
run: |
132+
DATE=$(date +'%Y-%m-%d')
133+
link="${{ vars.DEFAULT_TEST_REPORTS_URL }}/${DATE}/${{ github.run_id }}/${{ env.REPORT_NAME }}-${{ matrix.parallel }}/index.html"
134+
135+
echo "- [${link}](${link})" >> $GITHUB_STEP_SUMMARY
136+
137+

.github/workflows/tests.yml

Lines changed: 44 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -107,62 +107,59 @@ jobs:
107107
debug: ${{ inputs.debug || false }}
108108

109109
# # E2E Approve
110-
# e2e-approve:
111-
# runs-on: ubuntu-latest
112-
# needs: changes
113-
# timeout-minutes: 60
114-
# if: inputs.group_tests == 'all' || inputs.group_tests == 'only_e2e' || startsWith(github.ref_name, 'e2e/')
115-
# # environment: ${{ startsWith(github.ref_name, 'e2e/') && 'e2e-approve' || 'staging' }}
116-
# environment: 'staging'
117-
# name: Approve E2E tests
118-
# steps:
119-
# - uses: actions/checkout@v4
110+
e2e-approve:
111+
runs-on: ubuntu-latest
112+
needs: changes
113+
if: inputs.group_tests == 'all' || inputs.group_tests == 'only_e2e' || startsWith(github.ref_name, 'e2e/')
114+
timeout-minutes: 60
115+
environment: ${{ startsWith(github.ref_name, 'e2e/') && 'e2e-approve' || 'staging' }}
116+
name: Approve E2E tests
117+
steps:
118+
- uses: actions/checkout@v4
120119

121120
# E2E Docker
122-
# build-docker:
123-
# uses: ./.github/workflows/pipeline-build-docker.yml
124-
# needs: e2e-approve
125-
# secrets: inherit
126-
# with:
127-
# debug: ${{ inputs.debug || false }}
128-
# only_docker: true
121+
build-docker:
122+
uses: ./.github/workflows/pipeline-build-docker.yml
123+
needs: e2e-approve
124+
secrets: inherit
125+
with:
126+
debug: ${{ inputs.debug || false }}
127+
for_e2e_tests: true
129128

130129
e2e-docker-tests:
131-
# needs: build-docker
130+
needs: build-docker
132131
uses: ./.github/workflows/tests-e2e-docker.yml
133132
secrets: inherit
134133
with:
135134
debug: ${{ inputs.debug || false }}
136135

137136
# E2E AppImage
138-
# build-appimage:
139-
# uses: ./.github/workflows/pipeline-build-linux.yml
140-
# needs: e2e-approve
141-
# secrets: inherit
142-
# with:
143-
# target: linux:appimage:x64
144-
# debug: ${{ inputs.debug || false }}
145-
146-
# e2e-appimage-tests:
147-
# needs: build-appimage
148-
# uses: ./.github/workflows/tests-e2e-appimage.yml
149-
# secrets: inherit
150-
# with:
151-
# debug: ${{ inputs.debug || false }}
152-
153-
# clean:
154-
# uses: ./.github/workflows/clean-deployments.yml
155-
# needs: [frontend-tests, backend-tests, integration-tests, e2e-docker-tests, e2e-appimage-tests]
156-
# if: ${{ !inputs.pre_release && always() }}
137+
build-appimage:
138+
uses: ./.github/workflows/pipeline-build-linux.yml
139+
needs: e2e-approve
140+
secrets: inherit
141+
with:
142+
target: build_linux_appimage_x64
143+
debug: ${{ inputs.debug || false }}
144+
145+
e2e-appimage-tests:
146+
needs: build-appimage
147+
uses: ./.github/workflows/tests-e2e-appimage.yml
148+
secrets: inherit
149+
with:
150+
debug: ${{ inputs.debug || false }}
151+
152+
clean:
153+
uses: ./.github/workflows/clean-deployments.yml
154+
if: always()
155+
needs: [frontend-tests, backend-tests, integration-tests, e2e-docker-tests, e2e-appimage-tests]
157156

158157
# Remove artifacts from github actions
159-
# remove-artifacts:
160-
# name: Remove artifacts
161-
# needs: [clean]
162-
# if: ${{ !inputs.pre_release && always() }}
163-
# runs-on: ubuntu-latest
164-
165-
# steps:
166-
# - uses: actions/checkout@v4
167-
# - name: Remove all artifacts
168-
# uses: ./.github/actions/remove-artifacts
158+
remove-artifacts:
159+
name: Remove artifacts
160+
needs: [frontend-tests, backend-tests, integration-tests, e2e-docker-tests, e2e-appimage-tests]
161+
runs-on: ubuntu-latest
162+
steps:
163+
- uses: actions/checkout@v4
164+
- name: Remove all artifacts
165+
uses: ./.github/actions/remove-artifacts

0 commit comments

Comments
 (0)