Skip to content

Commit 1768d0a

Browse files
committed
Fix integration workflow bugs
1 parent b682e11 commit 1768d0a

File tree

3 files changed

+34
-14
lines changed

3 files changed

+34
-14
lines changed

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ runs:
7878

7979
- name: Run tests
8080
run: |
81+
set -e
82+
8183
run_tests() {
8284
local protocol=$1
8385
local eventloop=""
@@ -88,7 +90,7 @@ runs:
8890

8991
echo "::group::RESP${protocol} standalone tests"
9092
echo "REDIS_MOD_URL=${REDIS_MOD_URL}"
91-
invoke standalone-tests --redis-mod-url=${REDIS_MOD_URL} $eventloop --protocol=${protocol}
93+
invoke standalone-tests --redis-mod-url=${REDIS_MOD_URL} $eventloop --protocol="${protocol}"
9294
echo "::endgroup::"
9395

9496
if [ "$protocol" == "2" ] || [ "${{inputs.parser-backend}}" != 'hiredis' ]; then
@@ -98,18 +100,26 @@ runs:
98100
fi
99101
}
100102

101-
run_tests 2
102-
run_tests 3
103+
run_tests 2 "${{inputs.event-loop}}"
104+
run_tests 3 "${{inputs.event-loop}}"
103105
shell: bash
104106

105107
- name: Debug
106108
if: failure()
107109
run: |
110+
sudo apt-get install -y redis-tools
108111
echo "Docker Containers:"
109112
docker ps
110113
redis-cli -p 16379 CLUSTER NODES
111114
shell: bash
112115

116+
- name: Setup upterm session
117+
if: failure()
118+
uses: lhotari/action-upterm@v1
119+
with:
120+
limit-access-to-actor: true
121+
limit-access-to-users: uglide
122+
113123
- name: Upload test results and profiling data
114124
uses: actions/upload-artifact@v4
115125
with:

.github/workflows/integration.yaml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,24 @@ jobs:
5757
pip install -r dev_requirements.txt
5858
invoke linters
5959
60+
redis_version:
61+
runs-on: ubuntu-latest
62+
outputs:
63+
CURRENT: ${{ env.CURRENT_REDIS_VERSION }}
64+
steps:
65+
- name: Compute outputs
66+
run: |
67+
echo "CURRENT=${{ env.CURRENT_REDIS_VERSION }}" >> $GITHUB_OUTPUT
68+
6069
tests:
6170
runs-on: ubuntu-latest
6271
timeout-minutes: 60
72+
needs: redis_version
6373
strategy:
6474
max-parallel: 15
6575
fail-fast: false
6676
matrix:
67-
redis-version: [${{ env.CURRENT_REDIS_VERSION }}] #, '8.0-M01', '7.2.6', '6.2.16']
77+
redis-version: [ '${{ needs.redis_version.outputs.CURRENT }}' ] #, '8.0-M01', '7.2.6', '6.2.16']
6878
python-version: ['3.8', '3.12']
6979
parser-backend: ['plain']
7080
event-loop: ['asyncio']
@@ -82,13 +92,13 @@ jobs:
8292

8393
python-compatibility-tests:
8494
runs-on: ubuntu-latest
85-
needs: [ tests ]
95+
needs: [ redis_version, tests ]
8696
timeout-minutes: 60
8797
strategy:
8898
max-parallel: 15
8999
fail-fast: false
90100
matrix:
91-
redis-version: [ ${{ env.CURRENT_REDIS_VERSION }}]
101+
redis-version: [ '${{ needs.redis_version.outputs.CURRENT }}' ]
92102
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.9', 'pypy-3.10']
93103
parser-backend: [ 'plain' ]
94104
event-loop: [ 'asyncio' ]
@@ -106,13 +116,13 @@ jobs:
106116

107117
hiredis-tests:
108118
runs-on: ubuntu-latest
109-
needs: [tests]
119+
needs: [redis_version, tests]
110120
timeout-minutes: 60
111121
strategy:
112122
max-parallel: 15
113123
fail-fast: false
114124
matrix:
115-
redis-version: [ ${{ env.CURRENT_REDIS_VERSION }} ]
125+
redis-version: [ '${{ needs.redis_version.outputs.CURRENT }}' ]
116126
python-version: [ '3.8', '3.12']
117127
parser-backend: [ 'hiredis' ]
118128
event-loop: [ 'asyncio' ]
@@ -139,13 +149,13 @@ jobs:
139149

140150
uvloop-tests:
141151
runs-on: ubuntu-latest
142-
needs: [tests]
152+
needs: [redis_version, tests]
143153
timeout-minutes: 60
144154
strategy:
145155
max-parallel: 15
146156
fail-fast: false
147157
matrix:
148-
redis-version: [ ${{ env.CURRENT_REDIS_VERSION }} ]
158+
redis-version: [ '${{ needs.redis_version.outputs.CURRENT }}' ]
149159
python-version: [ '3.8', '3.12' ]
150160
parser-backend: [ 'plain' ]
151161
event-loop: [ 'uvloop' ]

docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ services:
1010
- REDIS_CLUSTER=no
1111
- PORT=6379
1212
- TLS_PORT=6666
13-
command: --enable-debug-command yes --tls-auth-clients optional
13+
command: --enable-debug-command yes --tls-auth-clients optional --save ""
1414
ports:
1515
- 6379:6379
1616
- 6666:6666 # TLS port
@@ -28,7 +28,7 @@ services:
2828
container_name: redis-replica
2929
depends_on:
3030
- redis
31-
command: redis-server --replicaof redis 6379 --protected-mode no
31+
command: redis-server --replicaof redis 6379 --protected-mode no --save ""
3232
ports:
3333
- 6380:6379
3434
profiles:
@@ -46,7 +46,7 @@ services:
4646
- TLS_ENABLED=yes
4747
- PORT=16379
4848
- TLS_PORT=27379
49-
command: --enable-debug-command yes --tls-auth-clients optional
49+
command: --enable-debug-command yes --tls-auth-clients optional --save ""
5050
ports:
5151
- "16379-16384:16379-16384"
5252
- "27379-27384:27379-27384"
@@ -108,7 +108,7 @@ services:
108108
ports:
109109
- 6479:6379
110110
environment:
111-
- "REDIS_ARGS=--enable-debug-command yes --enable-module-command yes"
111+
- "REDIS_ARGS=--enable-debug-command yes --enable-module-command yes --save ''"
112112
profiles:
113113
- standalone
114114
- all-stack

0 commit comments

Comments
 (0)