Skip to content

Commit

Permalink
change ci
Browse files Browse the repository at this point in the history
Signed-off-by: weedge <weege007@gmail.com>
  • Loading branch information
weedge committed Aug 30, 2023
1 parent 97b763b commit 44abd86
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
test-ubuntu-with-redis-6:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: clone and make redis
run: |
sudo apt-get install git
Expand All @@ -19,12 +19,12 @@ jobs:
make RM_INCLUDE_DIR=$(pwd)/redis/src
- name: test
run: |
sh -x $(pwd)/tests/run_test.sh
bash -x $(pwd)/tests/run_test.sh
test-ubuntu-with-redis-7:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: clone and make redis
run: |
sudo apt-get install git
Expand All @@ -37,4 +37,4 @@ jobs:
make RM_INCLUDE_DIR=$(pwd)/redis/src
- name: test
run: |
sh -x $(pwd)/tests/run_test.sh
bash -x $(pwd)/tests/run_test.sh
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Tips:
use conanfile py script todo ci with makefile release.
# Test
1. use `redis/src/redis-benchmark` add test data, test 1b data mgrt, see [doc/test.md](./docs/test.md).
2. need use redis tcl script `test_helper.tcl` to run test case;run `sh -x tests/run_test.sh`, so easy~
2. need use redis tcl script `test_helper.tcl` to run test case;run `bash -x tests/run_test.sh`, so easy~
3. ci loadmodule use test case to Redis test suite and run all test case. if new feat, add some test case in [tests/redisxslot.tcl](./tests/redisxslot.tcl)
# Cmd Case
```shell
Expand Down
10 changes: 4 additions & 6 deletions tests/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ set -e

# prepare install tclsh
OS=`uname -s 2>/dev/null || echo not`
NODENAME=`uname -n 2>/dev/null || echo not`
which tclsh
if [[ $? -eq 1 ]];then
if [[ ! -n $(which tclsh) ]];then
# for linux ubuntu os
if [[ $NODENAME == "ubuntu" ]] && [[ $OS == "Linux" ]];then
if [[ $OS == "Linux" ]] && [[ -n $(lsb_release -a | grep -i ubuntu) ]] ;then
sudo apt-get install tcl8.6 tclx
fi
# for mac os
if [ $OS == "Darwin" ];then
if [[ $OS == "Darwin" ]];then
brew install tcl-tk
fi
fi
Expand All @@ -20,7 +18,7 @@ fi
work_path=$(pwd)
module_path=$work_path
redis_path=$work_path/redis
[[ -n $1 ]] && redis_path=$1
if [[ -n $1 ]];then redis_path=$1;fi
sed -e "s#YOUR_PATH#$module_path#g" tests/redisxslot.tcl > $redis_path/tests/unit/moduleapi/redisxslot.tcl
sed -i -e 's#set ::all_tests {#set ::all_tests {\nunit/moduleapi/redisxslot#g' $redis_path/tests/test_helper.tcl
cd $redis_path
Expand Down

0 comments on commit 44abd86

Please sign in to comment.