Skip to content

Commit 11c08c1

Browse files
committed
#RI-6233 - Migrate VS Code from circleCI to GitHub Actions
1 parent da3e430 commit 11c08c1

13 files changed

+41
-76
lines changed

.github/actions/install-all-build-libs/action.yml

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ runs:
99
uses: actions/setup-node@v4
1010
with:
1111
node-version: '20.15'
12-
cache: 'yarn'
1312

1413
- name: Install dependencies for root package.js
1514
shell: bash

.github/e2e/test.app.sh

+1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ docker compose -f tests/e2e/rte.docker-compose.yml up --force-recreate -d -V
1111

1212
# Run tests
1313
RI_SOCKETS_CORS=true \
14+
xvfb-run --auto-servernum \
1415
yarn --cwd tests/e2e dotenv -e .ci.env yarn --cwd tests/e2e test:ci

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build
1+
name: 🚀 Build
22

33
on:
44
# Manual trigger build

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

+5-21
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,24 @@ jobs:
1616
environment: ${{ inputs.environment }}
1717

1818
steps:
19-
# SSH
20-
# - name: Setup upterm session
21-
# uses: mxschmitt/action-tmate@v3 #1 better
22-
2319
- uses: actions/checkout@v4
20+
# SSH
21+
# - name: Setup tmate session
22+
# uses: mxschmitt/action-tmate@v3
23+
# with:
24+
# detached: true
2425

25-
# - name: Install all libs and dependencies
26-
# uses: ./.github/actions/install-all-build-libs
2726
- name: Setup Node
2827
uses: actions/[email protected]
2928
with:
3029
node-version: '20.15'
31-
# disable cache for windows
32-
# https://github.com/actions/setup-node/issues/975
33-
cache: 'yarn'
34-
35-
# - name: Setup Python
36-
# uses: actions/setup-python@v5
37-
# with:
38-
# python-version: '3.11'
3930

4031
- name: Install dependencies for root package.js
4132
run: yarn install --frozen-lockfile
4233

43-
44-
# - run: rm -rf tsconfig.json
45-
4634
- name: Download backend
4735
uses: ./.github/actions/download-backend
4836

49-
# - run: ls -la ./scripts
50-
# - run: yarn download:backend
51-
# - run: yarn download:backend ${{ inputs.arch }}
52-
5337
- name: Set RI_SEGMENT_WRITE_KEY to .env file
5438
run: echo "RI_SEGMENT_WRITE_KEY='$RI_SEGMENT_WRITE_KEY'" >> $envFile
5539

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

-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ jobs:
2222
environment: ${{ inputs.environment }}
2323

2424
steps:
25-
# SSH
26-
# - name: Setup upterm session
27-
# uses: mxschmitt/action-tmate@v3 #1 better
28-
2925
- uses: actions/checkout@v4
3026

3127
- name: Install all libs and dependencies

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

-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ jobs:
1616
environment: ${{ inputs.environment }}
1717

1818
steps:
19-
# SSH debugging
20-
# - name: Setup upterm session
21-
# uses: mxschmitt/action-tmate@v3 #1 better
22-
2319
- uses: actions/checkout@v4
2420

2521
- name: Install all libs and dependencies

.github/workflows/release-prod.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release (prod)
1+
name: Release (prod)
22

33
on:
44
push:

.github/workflows/release-stage.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release (stage)
1+
name: 📖 Release (stage)
22

33
on:
44
push:

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

+16-22
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,25 @@ on:
1010

1111
env:
1212
SLACK_TEST_REPORT_KEY: ${{ secrets.SLACK_TEST_REPORT_KEY }}
13+
TEST_BIG_DB_DUMP: ${{ secrets.TEST_BIG_DB_DUMP }}
1314

1415
jobs:
1516
e2e-linux-tests:
1617
runs-on: ubuntu-latest
1718
name: E2E tests
18-
container:
19-
image: docker:latest
20-
options: --privileged
21-
volumes:
22-
- /usr/src/app/results:/usr/src/app/results
23-
- /usr/src/app/report:/usr/src/app/report
2419
strategy:
2520
fail-fast: false
2621
matrix:
2722
# Number of threads to run tests
28-
# parallel: [0, 1, 2, 3]
29-
parallel: [0]
23+
parallel: [0, 1, 2, 3]
3024

3125
steps:
3226
- uses: actions/checkout@v4
3327

34-
# - name: Setup repository
35-
# run: git config --global --add safe.directory /__w/RedisInsight/Redis-for-VS-Code
36-
37-
- name: Start Xvfb
38-
run: |
39-
apt-get install -y xvfb net-tools
40-
Xvfb :99 -screen 0 1920x1080x24 &
28+
- name: Setup Node
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: '20.15'
4132

4233
- name: Download linux artifact
4334
uses: actions/download-artifact@v4
@@ -48,14 +39,15 @@ jobs:
4839
- name: Setup e2e tests
4940
working-directory: ./tests/e2e
5041
run: |
42+
npm install -g @vscode/vsce
5143
yarn install
5244
yarn compile
5345
ls -R dist/tests/
5446
5547
- name: Generate short list of the test files
5648
working-directory: ./tests/e2e
5749
run: |
58-
testFiles=$(find tests -type f -name '*.e2e.js' | sort | awk "NR % 4 == ${{ matrix.parallel }}")
50+
testFiles=$(find dist -type f -name '*.e2e.js' | sort | awk "NR % 1 == ${{ matrix.parallel }}")
5951
echo $testFiles
6052
6153
# Multi-Line value
@@ -67,12 +59,12 @@ jobs:
6759
run: |
6860
.github/e2e/test.app.sh
6961
70-
- name: Upload Test Report
62+
- name: Upload Test Mocha Report
7163
uses: actions/upload-artifact@v4
7264
if: always()
7365
with:
74-
name: report-linux-node-${{ matrix.parallel }}
75-
path: /usr/src/app/report
66+
name: mocha-report-linux-node-${{ matrix.parallel }}
67+
path: tests/e2e/mochawesome-report
7668

7769
- name: Send report to Slack
7870
if: inputs.report && always()
@@ -85,7 +77,7 @@ jobs:
8577
if: always()
8678
with:
8779
name: 'Test results: E2E (linux) ${{ matrix.parallel }}th node'
88-
path: /usr/src/app/results/results.xml
80+
path: tests/e2e/mochawesome-report/junit-report.xml
8981
reporter: java-junit
9082
list-tests: 'failed'
9183
list-suites: 'failed'
@@ -99,6 +91,8 @@ jobs:
9991
id: merge-artifacts
10092
uses: actions/upload-artifact/merge@v4
10193
with:
102-
name: report-e2e-linux
103-
pattern: report-linux-node-*
94+
name: mocha-report-linux
95+
pattern: mocha-report-linux-node-*
96+
separate-directories: true
10497
delete-merged: true
98+
retention-days: 5

.github/workflows/tests.yml

+12-17
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Tests
1+
name: Tests
22

33
on:
44
push:
@@ -16,25 +16,20 @@ jobs:
1616
secrets: inherit
1717

1818
# E2E Approve
19-
# e2e-approve:
20-
# runs-on: ubuntu-latest
21-
# timeout-minutes: 60
22-
# if: startsWith(github.ref_name, 'e2e/')
23-
# environment: ${{ startsWith(github.ref_name, 'e2e/') && 'e2e-approve' || 'staging' }}
24-
# name: Approve E2E tests
25-
# steps:
26-
# - uses: actions/checkout@v4
19+
e2e-approve:
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 60
22+
if: startsWith(github.ref_name, 'e2e/')
23+
environment: ${{ startsWith(github.ref_name, 'e2e/') && 'e2e-approve' || 'staging' }}
24+
name: Approve E2E tests
2725

2826
# E2E Docker
29-
build:
30-
uses: ./.github/workflows/build.yml
27+
build-linux:
28+
uses: ./.github/workflows/pipeline-build-linux.yml
29+
needs: e2e-approve
3130
secrets: inherit
32-
# build-linux:
33-
# uses: ./.github/workflows/pipeline-build-linux.yml
34-
# needs: e2e-approve
35-
# secrets: inherit
3631

37-
e2e-linux-tests:
38-
needs: build
32+
e2e-linux-test:
33+
needs: build-linux
3934
uses: ./.github/workflows/tests-e2e-linux.yml
4035
secrets: inherit

tests/e2e/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"install:vs-code": "extest get-vscode -s ./test-resources",
1010
"install:chrome-driver": "extest get-chromedriver -s ./test-resources",
1111
"install:deps": "yarn install:vs-code && yarn install:chrome-driver",
12-
"install:extension": "extest install-vsix -f redis-insight-vsc-plugin.vsix -e ./test-extensions",
12+
"install:extension": "extest install-vsix -f redis-for-vscode-extension.vsix -e ./test-extensions",
1313
"test": "yarn run compile && dotenv -e .env extest run-tests dist/tests/setup.js dist/tests/**/*.js --code_settings settings.json -r . --extensions_dir ./test-extensions",
1414
"test:ci": "yarn compile && dotenv -e .env ts-node ./src/vscode.runner.ts",
1515
"test:ci:clear": "rimraf ./test-extensions && yarn --cwd ../../ package:prod && yarn compile && dotenv -e .ci.env ts-node ./src/vscode.runner.ts"

tests/e2e/src/tests/settings/settings.e2e.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ describe('Settings', () => {
8989
await ButtonActions.clickElement(InputWithButtons.cancelInput)
9090
// Check the previous delimiter value
9191
expect(await InputActions.getInputValue(settingsView.delimiterInput)).eql(
92-
':',
93-
'Default delimiter not applied',
92+
'uaoeu:',
93+
'Default uoeuaoe udelimiter not applied',
9494
)
9595

9696
// Change delimiter

tests/e2e/src/vscode.runner.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ import { VScodeScripts } from './helpers/scripts/vscodeScripts'
5959
let testFilesEnv: string | string[] = process.env.TEST_FILES!
6060
if (process.env.TEST_FILES) {
6161
testFilesEnv = process.env.TEST_FILES.split('\n').map(file => file.trim()).map((file) => {
62-
return path.join(__dirname, '..', 'dist', file)
62+
return path.join(__dirname, '..', file)
6363
})
6464

6565
// Always prepend setup.js

0 commit comments

Comments
 (0)