Skip to content

Commit 9b28aab

Browse files
authored
Added Tests CI (#8)
* Added Tests CI * Updated on push condition * Added timeout and dynamic DB port * Explicitly added ENV variable * Removed docker compose setup, renamed matrix types * Added Dotenv in CI
1 parent 318e8f8 commit 9b28aab

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
IMAGE=redislabs/redis:latest
2+
RE_USERNAME=test@test.com
3+
RE_PASS=12345
4+
RE_CLUSTER_NAME=test
5+
OSS_CLUSTER=true
6+
DB_PORT=6378

.github/workflows/modes/.env.proxy

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
IMAGE=redislabs/redis:latest
2+
RE_USERNAME=test@test.com
3+
RE_PASS=12345
4+
RE_CLUSTER_NAME=test
5+
OSS_CLUSTER=false
6+
DB_PORT=6379

.github/workflows/tests.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- '[0-9].[0-9]'
8+
pull_request:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
16+
build_cluster:
17+
name: Redis EE (${{ matrix.type }})
18+
runs-on: ubuntu-latest
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
type:
24+
- proxy
25+
- oss_cluster
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v3
30+
31+
- name: Load dotnenv for CI
32+
uses: xom9ikk/dotenv@v2
33+
with:
34+
path: .github/workflows/modes
35+
mode: ${{ matrix.type }}
36+
37+
- name: Build cluster
38+
run: |
39+
./build.sh
40+
sleep 5
41+
42+
- name: Run PING command
43+
run: |
44+
docker-compose exec -T master-node bash -c "/opt/redislabs/bin/redis-cli -p ${{ env.DB_PORT }} ping"

0 commit comments

Comments
 (0)