Skip to content

Commit

Permalink
feat: bump github.com/redis/go-redis/v9 (#43)
Browse files Browse the repository at this point in the history
* build: bump github.com/redis/go-redis/v9

* docs: update README with new dep

* Update ci.yml

* ci: match go version from gomod

* ci: bump semantic release too

* docs: add go version to readme

* docs: use go 1.17

* ci: use go 1.17

* ci: runs across matrix

* ci: just matrix go

* ci: quote go versions

* ci: on push/pull

* ci: no fast fail

* ci: fastfail back

* ci: fast fail but no continue on error

* ci: don't run twice for the same PR

* feat: upgrade go-redis from v8 to v9 (#46)

* build: bump github.com/redis/go-redis/v9.

* fix: bump github.com/redis/go-redis/v9.

* fix: fix CI.

* fix: fix CI.

* fix: change node.js version from 16 to 18

* fix: change node.js version from 16 to 18

* Update README.md

* Update README.md

* chore(gomod): bump deps

---------

Co-authored-by: Wenpeng Chen <wenpengchen@njust.edu.cn>
  • Loading branch information
sixcolors and cwp0 committed Apr 2, 2023
1 parent bc6a61d commit fed3072
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 32 deletions.
39 changes: 28 additions & 11 deletions .github/workflows/ci.yml
@@ -1,10 +1,20 @@
name: Go

on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: [ '1.17', '1.18', '1.19', '1.20' ]

services:
redis:
Expand All @@ -13,37 +23,44 @@ jobs:
- 6379:6379

steps:
- uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.14
go-version: ${{ matrix.go-version }}

- uses: actions/checkout@v2
- name: Test
run: go test -covermode atomic -coverprofile=covprofile ./...

- name: Install goveralls
env:
GO111MODULE: off
run: go get github.com/mattn/goveralls

- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=covprofile -service=github

semantic-release:
needs: [test]
if: github.repository == 'casbin/redis-watcher' && github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'

- uses: actions/checkout@v2
- name: Install semantic-release
run: npm install --save-dev semantic-release@21.0.0

- name: Run semantic-release
if: github.repository == 'casbin/redis-watcher' && github.event_name == 'push'
run: |
npm install --save-dev semantic-release@17.2.4
npx semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 5 additions & 1 deletion README.md
@@ -1,5 +1,9 @@
Redis Watcher
---

> For Go 1.17+, use v2.4.0+ ,
> For Go 1.16 and below, stay on v2.3.0.
[![Go](https://github.com/casbin/redis-watcher/actions/workflows/ci.yml/badge.svg)](https://github.com/casbin/redis-watcher/actions/workflows/ci.yml)
[![report](https://goreportcard.com/badge/github.com/casbin/redis-watcher)](https://goreportcard.com/report/github.com/casbin/redis-watcher)
[![Coverage Status](https://coveralls.io/repos/github/casbin/redis-watcher/badge.svg?branch=master)](https://coveralls.io/github/casbin/redis-watcher?branch=master)
Expand All @@ -22,7 +26,7 @@ import (

"github.com/casbin/casbin/v2"
rediswatcher "github.com/casbin/redis-watcher/v2"
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
)

func updateCallback(msg string) {
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Expand Up @@ -3,13 +3,13 @@ module github.com/casbin/redis-watcher/v2
go 1.18

require (
github.com/casbin/casbin/v2 v2.54.0
github.com/go-redis/redis/v8 v8.11.5
github.com/casbin/casbin/v2 v2.66.1
github.com/google/uuid v1.3.0
github.com/redis/go-redis/v9 v9.0.3
)

require (
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
)
23 changes: 8 additions & 15 deletions go.sum
@@ -1,29 +1,22 @@
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw=
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
github.com/casbin/casbin/v2 v2.54.0 h1:NFQ3Xkw6rfbD/rwEHMVRHVP5gUxhNQKdcZCb53pwSrA=
github.com/casbin/casbin/v2 v2.54.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg=
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/bsm/ginkgo/v2 v2.7.0 h1:ItPMPH90RbmZJt5GtkcNvIRuGEdwlBItdNVoyzaNQao=
github.com/bsm/gomega v1.26.0 h1:LhQm+AFcgV2M0WyKroMASzAzCAJVpAxQXv4SaI9a69Y=
github.com/casbin/casbin/v2 v2.66.1 h1:HOFlZYTUYx8ktgv5fLNFo6hr4K18ogGFq/lnYXv1OfA=
github.com/casbin/casbin/v2 v2.66.1/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc=
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
github.com/redis/go-redis/v9 v9.0.3 h1:+7mmR26M0IvyLxGZUHxu4GiBkJkVDid0Un+j4ScYu4k=
github.com/redis/go-redis/v9 v9.0.3/go.mod h1:WqMKv5vnQbRuZstUwxQI195wHy+t4PuXDOjzMvcuQHk=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 h1:DzZ89McO9/gWPsQXS/FVKAlG02ZjaQ6AlZRBimEYOd0=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
2 changes: 1 addition & 1 deletion options.go
@@ -1,8 +1,8 @@
package rediswatcher

import (
rds "github.com/go-redis/redis/v8"
"github.com/google/uuid"
rds "github.com/redis/go-redis/v9"
)

type WatcherOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion watcher.go
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/casbin/casbin/v2"
"github.com/casbin/casbin/v2/model"
"github.com/casbin/casbin/v2/persist"
rds "github.com/go-redis/redis/v8"
rds "github.com/redis/go-redis/v9"
)

type Watcher struct {
Expand Down

0 comments on commit fed3072

Please sign in to comment.