55 branches :
66 - master
77 pull_request :
8- schedule :
9- - cron : " 0 0 * * *"
8+ workflow_call :
9+
10+ concurrency :
11+ # if the event is a pull request, use the PR number to make PR checks cancel previous runs
12+ # if the event is not a pull request, use the run number to make each run unique
13+ group : CI-${{ github.event_name == 'pull_request' && github.event.number || github.run_number }}
14+ cancel-in-progress : true
1015
1116jobs :
1217 build :
1318 name : Test on ${{ matrix.platform }} with Python ${{ matrix.python }} with Redis ${{ matrix.redis-version }}
1419 runs-on : ${{ matrix.platform }}
1520 timeout-minutes : 40
1621 strategy :
22+ fail-fast : ${{ github.event_name == 'pull_request' }}
1723 matrix :
18- platform : ['ubuntu-22.04', 'macos-13']
19- python : ['3.7', '3.8', '3.9', '3.10', '3.11']
20- redis-version : ['7.0', '7.2']
21- fail-fast : false
24+ platform : ['ubuntu-latest', 'macos-latest']
25+ python : ['3.10', '3.14'] # min live version, latest testing
26+ redis-version : ['7.4', '8.2']
27+ # ubuntu-latest no longer supports python 3.7, macos-latest no longer supports python 3.10
28+ include :
29+ - platform : ubuntu-22.04
30+ python : ' 3.7'
31+ redis-version : ' 7.4'
32+ poetry-version : ' 1.5.1'
33+ - platform : macos-latest
34+ python : ' 3.11'
35+ redis-version : ' 8.2'
36+ exclude :
37+ - platform : macos-latest
38+ python : ' 3.10'
2239 defaults :
2340 run :
2441 shell : bash -l -eo pipefail {0}
2542
2643 steps :
2744 - name : checkout
28- uses : actions/checkout@v3
45+ uses : actions/checkout@v4
2946 # Number of commits to fetch. 0 indicates all history for all branches and tags.
3047 with :
3148 fetch-depth : ' '
3249
3350 - name : clone redis
34- uses : actions/checkout@v3
51+ uses : actions/checkout@v4
3552 # Number of commits to fetch. 0 indicates all history for all branches and tags.
3653 with :
3754 fetch-depth : ' '
@@ -40,31 +57,28 @@ jobs:
4057 path : redis
4158
4259 - name : Setup Python
43- uses : actions/setup-python@v4
60+ uses : actions/setup-python@v5
4461 with :
4562 python-version : ${{ matrix.python }}
4663 architecture : x64
4764
4865 - name : Setup Poetry
4966 uses : snok/install-poetry@v1
5067 with :
51- version : 1.5.1
68+ version : ${{ matrix.poetry-version || '2.2.1' }}
5269 virtualenvs-in-project : true
5370 virtualenvs-create : true
5471 installer-parallel : true
5572
5673 - name : Cache poetry
57- uses : actions/cache@v3
74+ uses : actions/cache@v4
5875 with :
59- path : ~/.cache/poetry # This path is specific to Ubuntu
76+ path : .venv
6077 # Look to see if there is a cache hit for the corresponding requirements file
6178 key : ${{ matrix.platform }}-${{ matrix.python }}-pyproject.toml-${{ hashFiles('pyproject.toml') }}
62- restore-keys : |
63- ${{ matrix.platform }}-${{ matrix.python }}-pyproject.toml-${{hashFiles('pyproject.toml')}}}
64-
6579
6680 - name : Install Python dependencies
67- run : poetry install -q
81+ run : poetry install
6882
6983 - name : Install Redis Server
7084 working-directory : redis
@@ -189,7 +203,7 @@ jobs:
189203 --tls
190204
191205 - name : Generate coverage report
192- if : matrix.python == '3.9 ' && matrix.platform != 'macos-13 '
206+ if : matrix.python == '3.14 ' && matrix.platform == 'ubuntu-latest '
193207 run : |
194208 TLS="tests/flow/tls"
195209 TLS_CERT=$TLS/redis.crt \
@@ -199,8 +213,8 @@ jobs:
199213 poetry run pytest --ignore=tests/flow --ignore=test_example.py --cov-config=.coveragerc --cov-report=xml --cov=RLTest
200214
201215 - name : Upload coverage to Codecov
202- uses : codecov/codecov-action@v3
203- if : matrix.python == '3.9 ' && matrix.platform != 'macos-13 '
216+ uses : codecov/codecov-action@v4
217+ if : matrix.python == '3.14 ' && matrix.platform == 'ubuntu-latest '
204218 continue-on-error : true
205219 with :
206220 token : ${{ secrets.CODECOV_TOKEN }}
0 commit comments