Add RE tests to CI #8
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: ['cluster'] | |
connection-type: ['hiredis', 'plain'] | |
re-build: ["7.2.4-92"] | |
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-internal:${{ matrix.re-build }}" | |
RE_USERNAME: [email protected] | |
RE_PASS: 12345 | |
RE_CLUSTER_NAME: test | |
RE_USE_OSS_CLUSTER: false | |
RE_DB_PORT: 6379 | |
DOCKER_ACCESS_TOKEN: ${{ secrets.DOCKER_ACCESS_TOKEN }} | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
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 |