Skip to content

Commit 26cbbfe

Browse files
committed
fix tests
1 parent ad90442 commit 26cbbfe

14 files changed

+53
-67
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ on:
4848

4949
environment:
5050
description: Environment to run build
51-
type: string
51+
type: environment
5252
default: 'staging'
5353
required: false
5454

.github/workflows/deploy-pages.yml

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,21 @@ on:
77
type: string
88
default: '*'
99

10+
permissions:
11+
contents: write
12+
1013
jobs:
1114
deploy:
12-
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
13-
permissions:
14-
pages: write # to deploy to Pages
15-
id-token: write # to verify the deployment originates from an appropriate source
16-
17-
# Deploy to the github-pages environment
18-
environment:
19-
name: github-pages
20-
url: ${{ steps.deployment.outputs.page_url }}
21-
22-
# Specify runner + deployment step
2315
runs-on: ubuntu-latest
2416
steps:
25-
- name: Merge artifacts by group
26-
id: merge-artifacts
27-
uses: actions/upload-artifact/merge@v4
17+
- uses: actions/checkout@v4
18+
19+
- uses: actions/download-artifact@v4
2820
with:
29-
name: ${{ inputs.group }}
3021
pattern: ${{ format('{0}*', inputs.group) }}
31-
separate-directories: true
32-
delete-merged: true
22+
path: public
3323

34-
- name: Deploy to GitHub Pages
35-
id: deployment
36-
uses: actions/deploy-pages@v4
24+
- name: Deploy 🚀
25+
uses: JamesIves/github-pages-deploy-action@v4
3726
with:
38-
artifact_name: ${{ steps.merge-artifacts.outputs.artifact-id }}
39-
preview: true # TODO: for test
40-
27+
folder: public

.github/workflows/tests-backend.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
required: false
1010

1111
env:
12+
SLACK_AUDIT_REPORT_CHANNEL: ${{ secrets.SLACK_AUDIT_REPORT_CHANNEL }}
1213
SLACK_AUDIT_REPORT_KEY: ${{ secrets.SLACK_AUDIT_REPORT_KEY }}
1314
DEFAULT_GITHUB_PAGES_URL: ${{ vars.DEFAULT_GITHUB_PAGES_URL }}
1415
REPORT_NAME: "report-be"
@@ -19,7 +20,7 @@ jobs:
1920
runs-on: ubuntu-latest
2021
environment:
2122
name: staging
22-
url: ${{ env.DEFAULT_GITHUB_PAGES_URL }}/be/
23+
url: ${{ env.DEFAULT_GITHUB_PAGES_URL }}/${{ env.REPORT_NAME }}/report
2324
steps:
2425
- uses: actions/checkout@v4
2526

@@ -56,28 +57,26 @@ jobs:
5657
- name: Unit tests API
5758
run: yarn --cwd redisinsight/api/ test:cov --ci --silent
5859

60+
61+
- name: Prepare report
62+
if: always()
63+
working-directory: redisinsight/api
64+
run: |
65+
mkdir report
66+
cp -R ./coverage ./report
67+
cp -a ./reports ./report/report
68+
5969
- name: Upload Test Report
6070
uses: actions/upload-artifact@v4
6171
if: always()
6272
with:
6373
name: ${{ env.REPORT_NAME }}
64-
path: redisinsight/api/reports
65-
66-
- name: Generate test results
67-
uses: dorny/test-reporter@v1
68-
if: always()
69-
with:
70-
name: 'Test results: BE unit tests'
71-
path: redisinsight/api/reports/jest-*.xml
72-
reporter: jest-junit
73-
list-tests: 'failed'
74-
list-suites: 'failed'
75-
fail-on-error: 'false'
74+
path: redisinsight/api/report
7675

7776
deploy-pages:
7877
name: Deploy report
7978
uses: ./.github/workflows/deploy-pages.yml
8079
needs: 'unit-tests'
8180
if: always()
8281
with:
83-
group: 'reports'
82+
group: 'report'

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
name: E2E AppImage tests
4141
environment:
4242
name: production
43-
url: ${{ env.DEFAULT_GITHUB_PAGES_URL }}/e2e/${{ env.REPORT_NAME }}
43+
url: ${{ env.DEFAULT_GITHUB_PAGES_URL }}/${{ env.REPORT_NAME }}
4444
steps:
4545
- uses: actions/checkout@v4
4646

@@ -55,7 +55,6 @@ jobs:
5555
run: |
5656
sudo apt-get update -y
5757
sudo apt-get install kmod libfuse2 xvfb net-tools fluxbox netcat -y
58-
# sudo apt-get install kmod libfuse2 xvfb net-tools fluxbox netcat appimagelauncher -y
5958
6059
- name: Download AppImage Artifacts
6160
uses: actions/download-artifact@v4
@@ -104,4 +103,4 @@ jobs:
104103
needs: 'e2e-tests-appimage'
105104
if: always()
106105
with:
107-
pattern: 'report'
106+
group: 'report'

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@ env:
2828
TEST_BIG_DB_DUMP: ${{ secrets.TEST_BIG_DB_DUMP }}
2929
DEFAULT_GITHUB_PAGES_URL: ${{ vars.DEFAULT_GITHUB_PAGES_URL }}
3030
E2E_VOLUME_PATH: "/usr/src/app"
31+
REPORT_NAME: "report-docker-node"
3132

3233
jobs:
3334
e2e-docker-tests:
3435
runs-on: ubuntu-latest
3536
name: E2E Docker tests
3637
environment:
3738
name: production
38-
url: ${{ env.DEFAULT_GITHUB_PAGES_URL }}/e2e/${{ matrix.parallel }}
39+
url: ${{ env.DEFAULT_GITHUB_PAGES_URL }}/${{ env.REPORT_NAME }}-${{ matrix.parallel }}
3940
container:
4041
image: docker:latest
4142
options: --privileged
@@ -65,11 +66,11 @@ jobs:
6566
uses: actions/download-artifact@v4
6667
with:
6768
name: docker
69+
path: ./release
6870

6971
- name: Load built docker image from workspace
7072
run: |
71-
docker image load -i ./docker/docker-linux-alpine.amd64.tar
72-
# docker pull redis/redisinsight
73+
docker image load -i ./release/docker-linux-alpine.amd64.tar
7374
7475
- name: Generate short list of the test files
7576
working-directory: ./tests/e2e
@@ -125,4 +126,4 @@ jobs:
125126
needs: 'e2e-docker-tests'
126127
if: always()
127128
with:
128-
pattern: 'report-*'
129+
group: 'report'

.github/workflows/tests-frontend.yml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
workflow_call:
44

55
env:
6+
SLACK_AUDIT_REPORT_CHANNEL: ${{ secrets.SLACK_AUDIT_REPORT_CHANNEL }}
67
SLACK_AUDIT_REPORT_KEY: ${{ secrets.SLACK_AUDIT_REPORT_KEY }}
78
DEFAULT_GITHUB_PAGES_URL: ${{ vars.DEFAULT_GITHUB_PAGES_URL }}
89
REPORT_NAME: "report-fe"
@@ -13,7 +14,7 @@ jobs:
1314
name: Frontend tests
1415
environment:
1516
name: staging
16-
url: ${{ env.DEFAULT_GITHUB_PAGES_URL }}/fe/
17+
url: ${{ env.DEFAULT_GITHUB_PAGES_URL }}/${{ env.REPORT_NAME }}/report
1718
steps:
1819
- uses: actions/checkout@v4
1920

@@ -54,28 +55,24 @@ jobs:
5455
- name: Unit tests UI
5556
run: yarn test:cov --ci --silent
5657

58+
- name: Prepare report
59+
if: always()
60+
run: |
61+
mkdir report
62+
cp -R ./coverage ./report
63+
cp -a ./reports ./report/report
64+
5765
- name: Upload Test Report
5866
uses: actions/upload-artifact@v4
5967
if: always()
6068
with:
6169
name: ${{ env.REPORT_NAME }}
62-
path: reports
63-
64-
- name: Generate test results
65-
uses: dorny/test-reporter@v1
66-
if: always()
67-
with:
68-
name: 'Test results: FE unit tests'
69-
path: reports/jest-*.xml
70-
reporter: jest-junit
71-
list-tests: 'failed'
72-
list-suites: 'failed'
73-
fail-on-error: 'false'
70+
path: report
7471

7572
deploy-pages:
7673
name: Deploy report
7774
uses: ./.github/workflows/deploy-pages.yml
7875
needs: 'unit-tests'
7976
if: always()
8077
with:
81-
group: 'reports'
78+
group: 'report'

.github/workflows/tests-integration.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ on:
2525

2626
env:
2727
SLACK_AUDIT_REPORT_KEY: ${{ secrets.SLACK_AUDIT_REPORT_KEY }}
28+
SLACK_AUDIT_REPORT_CHANNEL: ${{ secrets.SLACK_AUDIT_REPORT_CHANNEL }}
2829
TEST_MEDIUM_DB_DUMP: ${{ secrets.TEST_MEDIUM_DB_DUMP }}
2930
TEST_BIG_DB_DUMP: ${{ secrets.TEST_BIG_DB_DUMP }}
3031
DEFAULT_GITHUB_PAGES_URL: ${{ vars.DEFAULT_GITHUB_PAGES_URL }}
32+
REPORT_NAME: "report-it"
3133
ITESTS_NAMES: |
3234
{
3335
"oss-st-5": "OSS Standalone v5",
@@ -86,7 +88,7 @@ jobs:
8688
needs: set-matrix
8789
environment:
8890
name: production
89-
url: ${{ env.DEFAULT_GITHUB_PAGES_URL }}/it/${{ matrix.rte }}
91+
url: ${{ env.DEFAULT_GITHUB_PAGES_URL }}/${{ env.REPORT_NAME }}-${{ matrix.rte }}
9092
strategy:
9193
fail-fast: false
9294
matrix:

tests/e2e/.desktop.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,5 @@ RI_NOTIFICATION_SYNC_INTERVAL=30000
5050

5151
RI_FEATURES_CONFIG_URL=http://localhost:5551/remote/features-config.json
5252
RI_FEATURES_CONFIG_SYNC_INTERVAL=50000
53-
REMOTE_FOLDER_PATH=/home/circleci/project/tests/e2e/remote
53+
REMOTE_FOLDER_PATH=/home/runner/work/RedisInsight/RedisInsight/tests/e2e/remote
54+
# REMOTE_FOLDER_PATH=/home/circleci/project/tests/e2e/remote

tests/e2e/desktop.runner.ci.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import testcafe from 'testcafe';
2929
},
3030
{
3131
name: 'html',
32-
output: './report/report.html'
32+
output: './report/index.html'
3333
}
3434
])
3535
.run({

tests/e2e/desktop.runner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import testcafe from 'testcafe';
2929
},
3030
{
3131
name: 'html',
32-
output: './report/report.html'
32+
output: './report/index.html'
3333
}
3434
])
3535
.run({

0 commit comments

Comments
 (0)