Skip to content

Commit

Permalink
#362 again (#364)
Browse files Browse the repository at this point in the history
* Make improvements
---------

Signed-off-by: Wojciech Szarański <wojciech.szaranski@gmail.com>
Co-authored-by: Wojciech Szarański <wojciech.szaranski@gmail.com>
  • Loading branch information
alicebob and wszaranski committed Mar 23, 2024
1 parent 17b74c6 commit 9ac631e
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 13 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci.yaml
Expand Up @@ -16,7 +16,5 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Install Redis
run: (cd ./integration && ./get_redis.sh)
- name: Test
run: make int testrace
run: make ci
26 changes: 21 additions & 5 deletions Makefile
@@ -1,12 +1,28 @@
.PHONY: all test testrace int

all: test

.PHONY: test testrace int ci clean help
test:
go test ./...

testrace:
go test -race ./...

int:
INT=1 go test ./...
${MAKE} -C integration int

ci:
${MAKE} test
${MAKE} -C integration redis_src/redis-server int
${MAKE} testrace

clean:
${MAKE} -C integration clean

help:
ifeq ($(UNAME), Linux)
@grep -P '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
else
@# this is not tested, but prepared in advance for you, Mac drivers
@awk -F ':.*###' '$$0 ~ FS {printf "%15s%s\n", $$1 ":", $$2}' \
$(MAKEFILE_LIST) | grep -v '@awk' | sort
endif

16 changes: 11 additions & 5 deletions integration/Makefile
@@ -1,7 +1,13 @@
.PHONY: all test
.PHONY: int
int:
INT=1 go test

all: test
redis_src/redis-server: get_redis.sh
./get_redis.sh

test:
rm -f ./dump.rdb ./nodes.conf
INT=1 go test
.PHONY: clean
clean:
rm -rf \
redis_src \
dump.rdb \
nodes.conf
1 change: 1 addition & 0 deletions integration/get_redis.sh
Expand Up @@ -4,6 +4,7 @@ set -eu

VERSION=7.2.4

cd "$(dirname "$0")"
rm -rf ./redis_src/
mkdir -p ./redis_src/
cd ./redis_src/
Expand Down
2 changes: 2 additions & 0 deletions integration/sorted_set_test.go
Expand Up @@ -636,6 +636,7 @@ func TestSortedSetIncyby(t *testing.T) {
}

func TestZscan(t *testing.T) {
skip(t)
testRaw(t, func(c *client) {
// No set yet
c.Do("ZSCAN", "h", "0")
Expand Down Expand Up @@ -945,6 +946,7 @@ func TestZrandmember(t *testing.T) {
}

func TestZMScore(t *testing.T) {
skip(t)
testRaw(t, func(c *client) {
c.Do("ZADD", "q", "1.0", "key1")
c.Do("ZADD", "q", "2.0", "key2")
Expand Down

0 comments on commit 9ac631e

Please sign in to comment.