summaryrefslogtreecommitdiff
path: root/.github/workflows/version_coverage.yml
blob: c738a66e006af1f9e977d3fa8b44b0a82adcfc90 (plain)
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Redis Coverage Matrix

on:
  push:
    paths-ignore:
      - 'docs/**'
      - '**/*.rst'
      - '**/*.md'
    branches:
      - master
      - '[0-9].[0-9]'
  pull_request:
    branches:
      - master
      - '[0-9].[0-9]'

permissions:
    contents: read

jobs:

  run-tests-pre-7:
    services:
      redis:
        image: redis:${{matrix.redis-version}}
        ports:
          - 6379:6379
    runs-on: ubuntu-latest
    timeout-minutes: 30
    strategy:
      max-parallel: 15
      fail-fast: false
      matrix:
        redis-version: ['5.0', '6.0', '6.2']
        python-version: ['3.7', '3.11']
        redis-url: ["redis://localhost:6379"]
        resp: ["2"]


    env:
       ACTIONS_ALLOW_UNSECURE_COMMANDS: true
    name: redis ${{matrix.redis-version}} [resp ${{matrix.resp}}] [py ${{matrix.python-version}}]

    steps:
       - uses: actions/checkout@v3
       - uses: actions/setup-python@v4
         with:
           python-version: ${{ matrix.python-version }}
           cache: 'pip'
       - name: run tests
         run: |
           pip install -U setuptools wheel
           pip install -r dev_requirements.txt
           pip install -r requirements.txt
           pytest -m "not onlycluster and not redismod and not ssl and not replica" --redis-url=${{matrix.redis-url}}

  run-tests-7-plus:
    runs-on: ubuntu-latest
    timeout-minutes: 30
    strategy:
      max-parallel: 15
      fail-fast: false
      matrix:
        redis-version: ['7.0']
        python-version: ['3.7', '3.11']
        redis-url: ["redis://localhost:6379"]
        resp: ["2"]
        include:
            - redis-version: 7.0
              redis-url: "redis://localhost:6379?protocol=3"
              resp: "3"
              python-version: '3.7'
            - redis-version: 7.0
              redis-url: "redis://localhost:6379?protocol=3"
              resp: "3"
              python-version: '3.11'
            - redis-version: 7.0
              python-version: '3.7'
            - redis-version: 7.0
              python-version: '3.11'


    env:
       ACTIONS_ALLOW_UNSECURE_COMMANDS: true
    name: redis ${{matrix.redis-version}} [resp ${{matrix.resp}}] [py ${{matrix.python-version}}]

    steps:
       - run: |
          docker run -p 6379:6379 -d redis:${{matrix.redis-version}}  --enable-module-command yes --enable-debug-command yes
       - uses: actions/checkout@v3
       - uses: actions/setup-python@v4
         with:
           python-version: ${{ matrix.python-version }}
           cache: 'pip'
       - name: run tests
         run: |
           pip install -U setuptools wheel
           pip install -r dev_requirements.txt
           pip install -r requirements.txt
           pytest -m "not onlycluster and not redismod and not ssl and not replica" --redis-url=${{matrix.redis-url}}