|
1 | | - |
2 | | -name: Lint |
| 1 | +name: Test Suite |
3 | 2 |
|
4 | 3 | on: |
5 | 4 | pull_request: |
| 5 | + |
6 | 6 | push: |
7 | 7 | branches: |
8 | 8 | - main |
|
11 | 11 | POETRY_VERSION: "1.8.3" |
12 | 12 |
|
13 | 13 | jobs: |
14 | | - check: |
15 | | - name: Style-check ${{ matrix.python-version }} |
| 14 | + test: |
| 15 | + name: Python ${{ matrix.python-version }} - ${{ matrix.connection }} [redis-stack ${{matrix.redis-stack-version}}] |
16 | 16 | runs-on: ubuntu-latest |
| 17 | + |
17 | 18 | strategy: |
| 19 | + fail-fast: false |
18 | 20 | matrix: |
19 | | - # Only lint on the min and max supported Python versions. |
20 | | - # It's extremely unlikely that there's a lint issue on any version in between |
21 | | - # that doesn't show up on the min or max versions. |
22 | | - # |
23 | | - # GitHub rate-limits how many jobs can be running at any one time. |
24 | | - # Starting new jobs is also relatively slow, |
25 | | - # so linting on fewer versions makes CI faster. |
26 | | - python-version: |
27 | | - - "3.9" |
28 | | - - "3.10" |
29 | | - - "3.11" |
30 | | - - "3.12" |
| 21 | + python-version: [3.9, '3.10', 3.11, 3.12] |
| 22 | + connection: ['hiredis', 'plain'] |
| 23 | + redis-stack-version: ['6.2.6-v9', 'latest', 'edge'] |
| 24 | + |
| 25 | + services: |
| 26 | + redis: |
| 27 | + image: redis/redis-stack-server:${{matrix.redis-stack-version}} |
| 28 | + ports: |
| 29 | + - 6379:6379 |
31 | 30 |
|
32 | 31 | steps: |
33 | 32 | - uses: actions/checkout@v2 |
34 | 33 | - name: Set up Python ${{ matrix.python-version }} |
35 | | - uses: actions/setup-python@v2 |
| 34 | + uses: actions/setup-python@v4 |
36 | 35 | with: |
37 | 36 | python-version: ${{ matrix.python-version }} |
| 37 | + cache: 'pip' |
| 38 | + |
38 | 39 | - name: Install Poetry |
39 | 40 | uses: snok/install-poetry@v1 |
40 | 41 | with: |
41 | 42 | version: ${{ env.POETRY_VERSION }} |
| 43 | + |
42 | 44 | - name: Install dependencies |
43 | 45 | run: | |
44 | 46 | poetry install --all-extras |
45 | | - - name: runt tests |
| 47 | +
|
| 48 | + - name: Install hiredis if needed |
| 49 | + if: matrix.connection == 'hiredis' |
| 50 | + run: | |
| 51 | + poetry add hiredis |
| 52 | +
|
| 53 | + - name: Set Redis version |
| 54 | + run: | |
| 55 | + echo "REDIS_VERSION=${{ matrix.redis-stack-version }}" >> $GITHUB_ENV |
| 56 | +
|
| 57 | + - name: Run tests |
46 | 58 | run: | |
47 | | - make test |
| 59 | + make ci_test |
0 commit comments