Skip to content

Commit 8d8678d

Browse files
committed
Create a separate workflow instead
1 parent 4f5f47d commit 8d8678d

File tree

3 files changed

+72
-2
lines changed

3 files changed

+72
-2
lines changed

.github/actions/run-tests/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ inputs:
1414
description: 'hiredis version to test against'
1515
required: false
1616
default: '>3.0.0'
17+
hiredis-branch:
18+
description: 'hiredis branch to test against'
19+
required: false
20+
default: 'master'
1721
event-loop:
1822
description: 'Event loop to use'
1923
required: false
@@ -34,6 +38,7 @@ runs:
3438
repository: redis/hiredis-py
3539
submodules: true
3640
path: hiredis-py
41+
ref: ${{ inputs.hiredis-branch }}
3742

3843
- name: Setup Test environment
3944
env:
@@ -98,7 +103,6 @@ runs:
98103
shell: bash
99104

100105
- name: Run tests
101-
continue-on-error: ${{ inputs.parser-backend == 'hiredis' && inputs.hiredis-version == 'unstable' }}
102106
run: |
103107
set -e
104108
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Hiredis-py integration tests
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
redis-py-branch:
7+
description: 'redis-py branch to run tests on'
8+
required: true
9+
default: 'master'
10+
hiredis-branch:
11+
description: 'hiredis-py branch to run tests on'
12+
required: true
13+
default: 'master'
14+
15+
concurrency:
16+
group: ${{ github.event.pull_request.number || github.ref }}-hiredis-integration
17+
cancel-in-progress: true
18+
19+
permissions:
20+
contents: read # to fetch code (actions/checkout)
21+
22+
env:
23+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
24+
# this speeds up coverage with Python 3.12: https://github.com/nedbat/coveragepy/issues/1665
25+
COVERAGE_CORE: sysmon
26+
CURRENT_CLIENT_LIBS_TEST_STACK_IMAGE_TAG: 'rs-7.4.0-v2'
27+
CURRENT_REDIS_VERSION: '7.4.2'
28+
29+
jobs:
30+
redis_version:
31+
runs-on: ubuntu-latest
32+
outputs:
33+
CURRENT: ${{ env.CURRENT_REDIS_VERSION }}
34+
steps:
35+
- name: Compute outputs
36+
run: |
37+
echo "CURRENT=${{ env.CURRENT_REDIS_VERSION }}" >> $GITHUB_OUTPUT
38+
39+
hiredis-tests:
40+
runs-on: ubuntu-latest
41+
needs: [redis_version]
42+
timeout-minutes: 60
43+
strategy:
44+
max-parallel: 15
45+
fail-fast: false
46+
matrix:
47+
redis-version: [ '${{ needs.redis_version.outputs.CURRENT }}' ]
48+
python-version: [ '3.8', '3.13']
49+
parser-backend: [ 'hiredis' ]
50+
hiredis-version: [ 'unstable' ]
51+
hiredis-branch: ${{ inputs.hiredis-branch }}
52+
event-loop: [ 'asyncio' ]
53+
env:
54+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
55+
name: Redis ${{ matrix.redis-version }}; Python ${{ matrix.python-version }}; RESP Parser:${{matrix.parser-backend}} (${{ matrix.hiredis-version }}); EL:${{matrix.event-loop}}
56+
steps:
57+
- uses: actions/checkout@v4
58+
with:
59+
ref: ${{ inputs.redis-py-branch }}
60+
- name: Run tests
61+
uses: ./.github/actions/run-tests
62+
with:
63+
python-version: ${{ matrix.python-version }}
64+
parser-backend: ${{ matrix.parser-backend }}
65+
redis-version: ${{ matrix.redis-version }}
66+
hiredis-version: ${{ matrix.hiredis-version }}

.github/workflows/integration.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ jobs:
125125
redis-version: [ '${{ needs.redis_version.outputs.CURRENT }}' ]
126126
python-version: [ '3.8', '3.13']
127127
parser-backend: [ 'hiredis' ]
128-
hiredis-version: [ '>=3.0.0', '<3.0.0', 'unstable' ]
128+
hiredis-version: [ '>=3.0.0', '<3.0.0' ]
129129
event-loop: [ 'asyncio' ]
130130
env:
131131
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

0 commit comments

Comments
 (0)