Test Suite #134
This file contains hidden or 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: Test Suite | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "0 2 * * *" # 2 AM UTC nightly | |
workflow_dispatch: | |
env: | |
POETRY_VERSION: "1.8.3" | |
jobs: | |
test: | |
name: Python ${{ matrix.python-version }} - [redis ${{ matrix.redis-version }}] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.9, '3.10', 3.11, 3.12, 3.13] | |
redis-version: ['6.2.6-v9', 'latest', '8.0-M03'] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: ${{ env.POETRY_VERSION }} | |
- name: Install dependencies | |
run: | | |
pip wheel --no-cache-dir --use-pep517 ml-dtypes | |
poetry install --all-extras | |
- name: Set Redis image name | |
run: | | |
if [[ "${{ matrix.redis-version }}" == "8.0-M03" ]]; then | |
echo "REDIS_IMAGE=redis:${{ matrix.redis-version }}" >> $GITHUB_ENV | |
else | |
echo "REDIS_IMAGE=redis/redis-stack-server:${{ matrix.redis-version }}" >> $GITHUB_ENV | |
fi | |
- name: Run API tests | |
if: matrix.redis-version == 'latest' | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
run: | | |
make test-all | |
- name: Run tests | |
if: matrix.redis-version != 'latest' | |
run: | | |
make test |