Skip to content

Commit

Permalink
Added Tests CI (#8)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
vladvildanov authored Jan 2, 2024
1 parent 318e8f8 commit 9b28aab
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/modes/.env.oss_cluster
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
IMAGE=redislabs/redis:latest
RE_USERNAME=test@test.com
RE_PASS=12345
RE_CLUSTER_NAME=test
OSS_CLUSTER=true
DB_PORT=6378
6 changes: 6 additions & 0 deletions .github/workflows/modes/.env.proxy
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
IMAGE=redislabs/redis:latest
RE_USERNAME=test@test.com
RE_PASS=12345
RE_CLUSTER_NAME=test
OSS_CLUSTER=false
DB_PORT=6379
44 changes: 44 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Tests

on:
push:
branches:
- main
- '[0-9].[0-9]'
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

build_cluster:
name: Redis EE (${{ matrix.type }})
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
type:
- proxy
- oss_cluster

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Load dotnenv for CI
uses: xom9ikk/dotenv@v2
with:
path: .github/workflows/modes
mode: ${{ matrix.type }}

- name: Build cluster
run: |
./build.sh
sleep 5
- name: Run PING command
run: |
docker-compose exec -T master-node bash -c "/opt/redislabs/bin/redis-cli -p ${{ env.DB_PORT }} ping"

0 comments on commit 9b28aab

Please sign in to comment.