mirror of
http://github.com/valkey-io/valkey
synced 2024-11-23 03:33:28 +00:00
cd6b3d558b
On test failure store the external redis server logs as CI artifacts so we can review them. Write test name to server log for external server tests. This is attempted and silently failed in case external server doesn't support it. Note that in non-external server mode we use a more robust method of writing to the log which doesn't depend on the server actually running/working. This isn't possible for externl servers and required for some complex tests which are skipped in external mode anyway. Cleanup: remove dup code.
55 lines
1.5 KiB
YAML
55 lines
1.5 KiB
YAML
name: External Server Tests
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
|
|
jobs:
|
|
test-external-standalone:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 14400
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Build
|
|
run: make REDIS_CFLAGS=-Werror
|
|
- name: Start redis-server
|
|
run: ./src/redis-server --daemonize yes --logfile external-redis.log
|
|
- name: Run external test
|
|
run: |
|
|
./runtest \
|
|
--host 127.0.0.1 --port 6379 \
|
|
--tags -slow
|
|
- name: Archive redis log
|
|
if: ${{ failure() }}
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: test-external-redis-log
|
|
path: external-redis.log
|
|
|
|
test-external-cluster:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 14400
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Build
|
|
run: make REDIS_CFLAGS=-Werror
|
|
- name: Start redis-server
|
|
run: ./src/redis-server --cluster-enabled yes --daemonize yes --logfile external-redis.log
|
|
- name: Create a single node cluster
|
|
run: ./src/redis-cli cluster addslots $(for slot in {0..16383}; do echo $slot; done); sleep 5
|
|
- name: Run external test
|
|
run: |
|
|
./runtest \
|
|
--host 127.0.0.1 --port 6379 \
|
|
--cluster-mode \
|
|
--tags -slow
|
|
- name: Archive redis log
|
|
if: ${{ failure() }}
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: test-external-cluster-log
|
|
path: external-redis.log
|
|
|