Skip to content

Commit d6b8763

Browse files
authored
Updating build script and github workflow to get test framework from github and removing it locally (#56)
Signed-off-by: zackcam <[email protected]>
1 parent 5d514e0 commit d6b8763

File tree

7 files changed

+33
-724
lines changed

7 files changed

+33
-724
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
env:
88
CARGO_TERM_COLOR: always
99
VALKEY_REPO_URL: https://github.com/valkey-io/valkey.git
10+
TEST_FRAMEWORK_REPO: https://github.com/valkey-io/valkey-test-framework
11+
TEST_FRAMEWORK_DIR: tests/valkeytests
1012

1113
jobs:
1214
build-ubuntu-latest:
@@ -41,6 +43,13 @@ jobs:
4143
git checkout ${{ matrix.server_version }}
4244
make -j
4345
cp src/valkey-server ../binaries/${{ matrix.server_version }}/
46+
- name: Set up test framework
47+
run: |
48+
echo "Cloning test framework..."
49+
git clone ${{ env.TEST_FRAMEWORK_REPO }}
50+
mkdir -p ${{ env.TEST_FRAMEWORK_DIR }}
51+
mv valkey-test-framework/src/* ${{ env.TEST_FRAMEWORK_DIR }}/
52+
rm -rf valkey-test-framework
4453
- name: Set up Python
4554
uses: actions/setup-python@v3
4655
with:
@@ -100,6 +109,13 @@ jobs:
100109
make distclean
101110
make -j SANITIZER=address SERVER_CFLAGS='-Werror' BUILD_TLS=module
102111
cp src/valkey-server ../binaries/${{ matrix.server_version }}/
112+
- name: Set up test framework
113+
run: |
114+
echo "Cloning test framework..."
115+
git clone ${{ env.TEST_FRAMEWORK_REPO }}
116+
mkdir -p ${{ env.TEST_FRAMEWORK_DIR }}
117+
mv valkey-test-framework/src/* ${{ env.TEST_FRAMEWORK_DIR }}/
118+
rm -rf valkey-test-framework
103119
- name: Set up Python
104120
uses: actions/setup-python@v3
105121
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ tests/.build
44
__pycache__
55
test-data
66
.attach_pid*
7+
tests/valkeytests*

build.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,21 @@ else
5757
cp src/valkey-server ../binaries/$SERVER_VERSION/
5858
fi
5959

60+
61+
TEST_FRAMEWORK_REPO="https://github.com/valkey-io/valkey-test-framework"
62+
TEST_FRAMEWORK_DIR="tests/valkeytests"
63+
64+
if [ -d "$TEST_FRAMEWORK_DIR" ]; then
65+
echo "valkeytest found."
66+
else
67+
68+
echo "Cloning test framework..."
69+
git clone "$TEST_FRAMEWORK_REPO"
70+
mkdir -p "$TEST_FRAMEWORK_DIR"
71+
mv "valkey-test-framework/src"/* "$TEST_FRAMEWORK_DIR/"
72+
rm -rf valkey-test-framework
73+
fi
74+
6075
REQUIREMENTS_FILE="requirements.txt"
6176

6277
# Check if pip is available

tests/test_bloom_save_and_restore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,4 @@ def test_rdb_restore_non_bloom_compatibility(self):
130130

131131
assert self.server.num_keys(client=new_client) == 1
132132
assert new_client.get("string") == b"val"
133-
new_server.exit()
133+
new_server.exit()

tests/valkeytests/conftest.py

Lines changed: 0 additions & 98 deletions
This file was deleted.

tests/valkeytests/util/waiters.py

Lines changed: 0 additions & 101 deletions
This file was deleted.

0 commit comments

Comments
 (0)