Skip to content

RediseenUnitTest

RediseenUnitTest #948

name: RediseenUnitTest
on:
push:
schedule:
- cron: '0 5 * * *'
pull_request:
branches: ['master', 'develop']
jobs:
build:
name: CI
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
goversion: [1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18]
services:
redis:
image: redis:latest
ports:
- 6379/tcp
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.goversion }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Unit Test
env:
REDISEEN_KEY_PATTERN_EXPOSED: "^key:[.]*"
REDISEEN_KEY_PATTERN_EXPOSE_ALL: false
REDISEEN_REDIS_URI: redis://:@localhost:6400
REDISEEN_TEST_MODE: true
REDISEEN_DB_EXPOSED: 0-5
REAL_REDIS_URI: redis://:@localhost:${{ job.services.redis.ports['6379'] }}
run: go test -v -cover github.com/xd-deng/rediseen
- name: Build
run: |
go build -v .
./rediseen version