-
Notifications
You must be signed in to change notification settings - Fork 38
68 lines (53 loc) · 1.59 KB
/
test.yml
File metadata and controls
68 lines (53 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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.10', 3.11, 3.12, 3.13 ]
redis-version: [ '6.2.6-v9', 'latest', '8.0.2' ]
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.2" ]]; 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