Add RE tests to CI #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: RE Tests | |
on: | |
push: | |
paths-ignore: | |
- 'docs/**' | |
- '**/*.rst' | |
- '**/*.md' | |
branches: | |
- master | |
- '[0-9].[0-9]' | |
pull_request: | |
branches: | |
- master | |
- '[0-9].[0-9]' | |
schedule: | |
- cron: '0 1 * * *' # nightly build | |
concurrency: | |
group: ${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read # to fetch code (actions/checkout) | |
jobs: | |
enterprise_tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.10'] | |
test-type: ['standalone'] | |
connection-type: ['hiredis', 'plain'] | |
re-build: ["latest"] | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
name: RE [${{ matrix.re-build }} ${{ matrix.python-version }} ${{matrix.test-type}}-${{matrix.connection-type}}] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Clone Redis EE docker repository | |
uses: actions/checkout@v4 | |
with: | |
repository: RedisLabs/redis-ee-docker | |
path: redis-ee | |
- name: Set up python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Build cluster | |
working-directory: redis-ee | |
env: | |
IMAGE: "redislabs/redis:${{ matrix.re-build }}" | |
RE_USERNAME: [email protected] | |
RE_PASS: 12345 | |
RE_CLUSTER_NAME: test | |
RE_USE_OSS_CLUSTER: false | |
RE_DB_PORT: 6379 | |
run: ./build.sh | |
- name: Run tests | |
run: | | |
pip install -U setuptools wheel | |
pip install -r requirements.txt | |
pip install -r dev_requirements.txt | |
if [ "${{matrix.connection-type}}" == "hiredis" ]; then | |
pip install hiredis | |
fi | |
sleep 10 # time to settle | |
invoke ${{matrix.test-type}}-tests |