Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
7d55d03
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 22, 2024
476977e
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 22, 2024
b5b4bc6
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 22, 2024
b9a5815
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 22, 2024
8c4e551
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 22, 2024
f689e41
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 22, 2024
b422596
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 22, 2024
de544f0
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 22, 2024
cba3ee8
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 22, 2024
a77a4de
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 22, 2024
943f292
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 22, 2024
3d6417c
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 22, 2024
a96f8e2
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 24, 2024
e3d1fea
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 24, 2024
44f071a
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 24, 2024
c825e3d
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 24, 2024
22969a5
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 24, 2024
0ffffa9
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 24, 2024
7f923b6
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 24, 2024
a90d024
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 24, 2024
695962a
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 24, 2024
5b63d8a
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 24, 2024
4e555ab
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 24, 2024
c6c059b
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 24, 2024
116d28b
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 24, 2024
696c43a
Merge remote-tracking branch 'origin/main' into test/test
egor-zalenski Oct 24, 2024
cb5c2bc
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 24, 2024
a9dc901
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 24, 2024
cda9396
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 24, 2024
ebebb3f
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 24, 2024
fc3d7ef
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 25, 2024
b18f729
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 25, 2024
eba1c15
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 25, 2024
3a80545
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 25, 2024
4e58046
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 25, 2024
0e7a199
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 25, 2024
df0532b
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 25, 2024
d22c13e
Merge remote-tracking branch 'origin/main' into be/feature/test2
egor-zalenski Oct 25, 2024
5247053
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 25, 2024
6f840ff
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 25, 2024
6c9558c
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 25, 2024
07cbd7e
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 25, 2024
185b2e7
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 25, 2024
7197ade
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 25, 2024
ee5991e
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 25, 2024
ffbc061
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 25, 2024
849cf07
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 25, 2024
ea753e4
check tests
egor-zalenski Oct 25, 2024
1bb345d
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 25, 2024
4fb7eba
Merge branch 'e2e/test' into be/test/pr
egor-zalenski Oct 25, 2024
b48171a
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 25, 2024
eb72bdc
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 25, 2024
a2685be
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 25, 2024
0e2a108
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 25, 2024
c15f9c6
test
egor-zalenski Oct 29, 2024
a898094
test
egor-zalenski Oct 29, 2024
bcf8d4c
fix
egor-zalenski Oct 29, 2024
4e6b672
#RI-6214 - Migrate e2e/it workflows from CircleCI to Github Actions
egor-zalenski Oct 29, 2024
be7938f
Merge remote-tracking branch 'origin/e2e/feature/test' into feature/R…
egor-zalenski Oct 29, 2024
451956d
remove publish-tests-results
egor-zalenski Oct 29, 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
2 changes: 1 addition & 1 deletion .github/actions/install-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ runs:
# export npm_config_keytar_binary_host_mirror=${{ inputs.keytar-host-mirror }}
# export npm_config_node_sqlite3_binary_host_mirror=${{ inputs.sqlite3-host-mirror }}

yarn install
yarn install --frozen-lockfile --network-timeout 1000000
58 changes: 58 additions & 0 deletions .github/e2e-results.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
const fs = require('fs');

let parallelNodeInfo = '';
// const totalNodes = parseInt(process.env.NODE_TOTAL, 10);
const totalNodes = 4;
if (totalNodes > 1) {
parallelNodeInfo = ` (node: ${parseInt(process.env.NODE_INDEX, 10) + 1}/${totalNodes})`
}

const file = 'tests/e2e/results/e2e.results.json'
const appBuildType = process.env.APP_BUILD_TYPE || 'Web'
const results = {
message: {
text: `*E2ETest - ${appBuildType}${parallelNodeInfo}* (Branch: *${process.env.GITHUB_REF_NAME}*)` +
`\n<https://github.com/RedisInsight/RedisInsight/actions/runs/${process.env.GITHUB_RUN_ID}|View on Github Actions>`,
attachments: [],
},
};

const result = JSON.parse(fs.readFileSync(file, 'utf-8'))
const testRunResult = {
color: '#36a64f',
title: `Started at: *${result.startTime}`,
text: `Executed ${result.total} in ${(new Date(result.endTime) - new Date(result.startTime)) / 1000}s`,
fields: [
{
title: 'Passed',
value: result.passed,
short: true,
},
{
title: 'Skipped',
value: result.skipped,
short: true,
},
],
};
const failed = result.total - result.passed;
if (failed) {
results.passed = false;
testRunResult.color = '#cc0000';
testRunResult.fields.push({
title: 'Failed',
value: failed,
short: true,
});
}

results.message.attachments.push(testRunResult);

if (results.passed === false) {
results.message.text = '<!here> ' + results.message.text;
}

fs.writeFileSync('e2e.report.json', JSON.stringify({
channel: process.env.SLACK_TEST_REPORT_CHANNEL,
...results.message,
}));
23 changes: 23 additions & 0 deletions .github/e2e/test.app-image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
set -e

yarn --cwd tests/e2e install

# mount app resources
chmod +x ./release/*.AppImage
./release/*.AppImage --appimage-mount >> apppath &

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

# run rte
docker compose -f tests/e2e/rte.docker-compose.yml build
docker compose -f tests/e2e/rte.docker-compose.yml up --force-recreate -d -V
./tests/e2e/wait-for-redis.sh localhost 12000 && \

# run tests
COMMON_URL=$(tail -n 1 apppath)/resources/app.asar/dist/renderer/index.html \
ELECTRON_PATH=$(tail -n 1 apppath)/redisinsight \
RI_SOCKETS_CORS=true \
yarn --cwd tests/e2e dotenv -e .desktop.env yarn --cwd tests/e2e test:desktop:ci
51 changes: 51 additions & 0 deletions .github/itest-results.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
const fs = require('fs');

const file = 'redisinsight/api/test/test-runs/coverage/test-run-result.json'

const results = {
message: {
text: `*ITest - ${process.env.ITEST_NAME}* (Branch: *${process.env.GITHUB_REF_NAME}*)` +
`\n<https://github.com/RedisInsight/RedisInsight/actions/runs/${process.env.GITHUB_RUN_ID}|View on Github Actions>`,
attachments: [],
},
};

const result = JSON.parse(fs.readFileSync(file, 'utf-8'))
const testRunResult = {
color: '#36a64f',
title: `Started at: ${result.stats.start}`,
text: `Executed ${result.stats.tests} in ${result.stats.duration / 1000}s`,
fields: [
{
title: 'Passed',
value: result.stats.passes,
short: true,
},
{
title: 'Skipped',
value: result.stats.pending,
short: true,
},
],
};

if (result.stats.failures) {
results.passed = false;
testRunResult.color = '#cc0000';
testRunResult.fields.push({
title: 'Failed',
value: result.stats.failures,
short: true,
});
}

results.message.attachments.push(testRunResult);

if (results.passed === false) {
results.message.text = '<!here> ' + results.message.text;
}

fs.writeFileSync('itests.report.json', JSON.stringify({
channel: process.env.SLACK_TEST_REPORT_CHANNEL,
...results.message,
}));
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: 🚀 Build

on:
# Manual trigger build
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/compress-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Checkout Repo
uses: actions/checkout@v4

- name: Compress Images
uses: calibreapp/image-actions@main
with:
# The `GITHUB_TOKEN` is automatically generated by GitHub and scoped only to the repository that is currently running the action. By default, the action can’t update Pull Requests initiated from forked repositories.
# See https://docs.github.com/en/actions/reference/authentication-in-a-workflow and https://help.github.com/en/articles/virtual-environments-for-github-actions#token-permissions
githubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Compress Images
uses: calibreapp/image-actions@main
with:
# The `GITHUB_TOKEN` is automatically generated by GitHub and scoped only to the repository that is currently running the action. By default, the action can’t update Pull Requests initiated from forked repositories.
# See https://docs.github.com/en/actions/reference/authentication-in-a-workflow and https://help.github.com/en/articles/virtual-environments-for-github-actions#token-permissions
githubToken: ${{ secrets.GITHUB_TOKEN }}
33 changes: 33 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Nightly jobs
on:
schedule:
- cron: 0 0 * * *

jobs:
# Integration tests
build-docker:
uses: ./.github/workflows/pipeline-build-docker.yml
secrets: inherit

integration-tests-nightly:
needs: build-docker
uses: ./.github/workflows/tests-integration.yml
secrets: inherit
with:
build: 'docker'
report: true
short_rte_list: false

# E2E tests
build-appimage:
uses: ./.github/workflows/pipeline-build-linux.yml
secrets: inherit
with:
target: 'linux:appimage:x64'

e2e-appimage-nightly:
uses: ./.github/workflows/tests-e2e-appimage.yml
needs: build-appimage
secrets: inherit
with:
report: true
13 changes: 10 additions & 3 deletions .github/workflows/pipeline-build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
required: false
default: 'staging'
type: string
only_docker:
description: Build only docker
required: false
default: false
type: boolean

jobs:
build:
Expand All @@ -28,7 +33,7 @@ jobs:
- name: Build sources
run: ./.circleci/build/build.sh

# todo: matrix
# todo: matrix
- name: Build web archives
run: |
unset npm_config_keytar_binary_host_mirror
Expand Down Expand Up @@ -82,15 +87,17 @@ jobs:

- uses: actions/upload-artifact@v4
name: Upload web-mini artifacts
if: ${{ !inputs.only_docker }}
with:
if-no-files-found: error
if-no-files-found: warn
name: web-mini
path: ./release/web-mini

- uses: actions/upload-artifact@v4
name: Upload web artifacts
if: ${{ !inputs.only_docker }}
with:
if-no-files-found: error
if-no-files-found: warn
name: web
path: ./release/web

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pipeline-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
# ssh
# - run: sudo apt-get update -qy && sudo apt-get install -qy tmux;
# - name: Setup upterm session
# - uses: mxschmitt/action-tmate #1 better
# - uses: mxschmitt/action-tmate@v3 #1 better
# uses: lhotari/action-upterm@v1 #2
# with:
# limit-access-to-actor: true
Expand Down Expand Up @@ -83,6 +83,7 @@ jobs:
name: linux-appimage-build
path: |
./release/Redis-Insight*.AppImage
./release/latest-linux.yml

- uses: actions/upload-artifact@v4
name: Upload Deb artifact
Expand All @@ -104,7 +105,6 @@ jobs:
name: linux-snap-builds
path: |
./release/Redis-Insight*.snap
./release/latest-linux.yml

env:
RI_AI_CONVAI_TOKEN: ${{ secrets.RI_AI_CONVAI_TOKEN }}
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/pull-request-created.yml

This file was deleted.

17 changes: 15 additions & 2 deletions .github/workflows/release-prod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release (prod)
name: Release (prod)

on:
push:
Expand All @@ -11,7 +11,8 @@ jobs:
uses: ./.github/workflows/tests.yml
secrets: inherit
with:
all_tests: true
group_tests: 'without_e2e'
short_rte_list: false

builds-prod:
name: Create all builds for release
Expand All @@ -22,6 +23,18 @@ jobs:
environment: 'production'
target: 'all'

e2e-docker-tests:
name: E2E Docker tests
needs: builds-prod
uses: ./.github/workflows/tests-e2e-docker.yml
secrets: inherit

e2e-appimage-tests:
name: E2E AppImage tests
needs: builds-prod
uses: ./.github/workflows/tests-e2e-appimage.yml
secrets: inherit

virustotal-prod:
name: Virustotal
uses: ./.github/workflows/virustotal.yml
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/release-stage.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release (stage)
name: 📖 Release (stage)

on:
push:
Expand All @@ -11,7 +11,8 @@ jobs:
uses: ./.github/workflows/tests.yml
secrets: inherit
with:
all_tests: true
group_tests: 'without_e2e'
short_rte_list: false

builds:
name: Release stage builds
Expand All @@ -22,16 +23,15 @@ jobs:
environment: 'staging'
target: 'all'

e2e-docker-tests:
needs: builds
uses: ./.github/workflows/tests-e2e-docker.yml
secrets: inherit

# todo: e2e tests for release stage
# e2e-linux:
# uses: ./.github/workflows/build.yml
# needs: builds
# secrets: inherit
# with:
# environment: 'staging'
# target: 'all'

e2e-appimage-tests:
needs: builds
uses: ./.github/workflows/tests-e2e-appimage.yml
secrets: inherit



Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/tests-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:

jobs:
unit-tests:
name: Backend tests
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -49,4 +49,16 @@ jobs:
curl -H "Content-type: application/json" --data @$WORKDIR/slack.$FILENAME -H "Authorization: Bearer $SLACK_AUDIT_REPORT_KEY" -X POST https://slack.com/api/chat.postMessage

- name: Unit tests API
run: yarn --cwd redisinsight/api/ test:cov --ci
run: yarn --cwd redisinsight/api/ test:cov --ci --silent

- name: Generate test results
uses: dorny/test-reporter@v1
if: always()
with:
name: 'Test results: BE unit tests'
path: redisinsight/api/reports/jest-*.xml
reporter: jest-junit
list-tests: 'failed'
list-suites: 'failed'
fail-on-error: 'false'

Loading
Loading