CI matrix changes

This commit is contained in:
Chayim I. Kirshen 2023-05-02 12:00:44 +03:00
parent fcb3506e79
commit dbca980f10
2 changed files with 7 additions and 4 deletions

View File

@ -16,11 +16,12 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
go-version: [1.19.x, 1.20.x] go-version: [1.18.x, 1.19.x, 1.20.x]
redis-version: ['5.0.14', '6.0.19', '6.2.12', '7.0.11', '7.2-rc1']
services: services:
redis: redis:
image: redis:7.2-rc image: redis:${{matrix.redis-version}}
options: >- options: >-
--health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5 --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
ports: ports:
@ -36,4 +37,4 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Test - name: Test
run: make test run: make test REDIS_VERSION=${{matrix.redis-version}}

View File

@ -1,5 +1,7 @@
GO_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | sort) GO_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | sort)
REDIS_VERSION := 7.2-rc1
test: testdeps test: testdeps
set -e; for dir in $(GO_MOD_DIRS); do \ set -e; for dir in $(GO_MOD_DIRS); do \
echo "go test in $${dir}"; \ echo "go test in $${dir}"; \
@ -23,7 +25,7 @@ bench: testdeps
testdata/redis: testdata/redis:
mkdir -p $@ mkdir -p $@
wget -qO- https://download.redis.io/releases/redis-7.2-rc1.tar.gz | tar xvz --strip-components=1 -C $@ wget -qO- https://download.redis.io/releases/redis-${REDIS_VERSION}.tar.gz | tar xvz --strip-components=1 -C $@
testdata/redis/src/redis-server: testdata/redis testdata/redis/src/redis-server: testdata/redis
cd $< && make all cd $< && make all