Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#362 again #364

Merged
merged 4 commits into from
Mar 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -eu

VERSION=7.2.0

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
Original file line number Diff line number Diff line change
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
Loading