Skip to content

Commit 6c8eb80

Browse files
committed
feat: improve CI and README badges
1 parent fed3072 commit 6c8eb80

File tree

4 files changed

+23
-19
lines changed

4 files changed

+23
-19
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ name: Go
22

33
on:
44
push:
5-
branches:
6-
- master
5+
branches: [ master ]
76
pull_request:
8-
branches:
9-
- master
7+
branches: [ master ]
108

119
jobs:
1210
test:
1311
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
go-version: [ '1.17', '1.18', '1.19', '1.20' ]
17+
go-version: [ '1.23' ]
1818

1919
services:
2020
redis:
@@ -35,9 +35,7 @@ jobs:
3535
run: go test -covermode atomic -coverprofile=covprofile ./...
3636

3737
- name: Install goveralls
38-
env:
39-
GO111MODULE: off
40-
run: go get github.com/mattn/goveralls
38+
run: go install github.com/mattn/goveralls@latest
4139

4240
- name: Send coverage
4341
env:
@@ -48,6 +46,8 @@ jobs:
4846
needs: [test]
4947
if: github.repository == 'casbin/redis-watcher' && github.event_name == 'push'
5048
runs-on: ubuntu-latest
49+
permissions:
50+
contents: write
5151
steps:
5252
- name: Checkout code
5353
uses: actions/checkout@v3
@@ -58,7 +58,7 @@ jobs:
5858
node-version: '18.x'
5959

6060
- name: Install semantic-release
61-
run: npm install --save-dev semantic-release@21.0.0
61+
run: npm install --save-dev semantic-release@21.0.0 @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/github
6262

6363
- name: Run semantic-release
6464
run: npx semantic-release

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
1-
Redis Watcher
2-
---
3-
4-
> For Go 1.17+, use v2.4.0+ ,
5-
> For Go 1.16 and below, stay on v2.3.0.
1+
Redis Watcher
2+
====
63

4+
[![Go Report Card](https://goreportcard.com/badge/github.com/casbin/redis-watcher)](https://goreportcard.com/report/github.com/casbin/redis-watcher)
75
[![Go](https://github.com/casbin/redis-watcher/actions/workflows/ci.yml/badge.svg)](https://github.com/casbin/redis-watcher/actions/workflows/ci.yml)
8-
[![report](https://goreportcard.com/badge/github.com/casbin/redis-watcher)](https://goreportcard.com/report/github.com/casbin/redis-watcher)
96
[![Coverage Status](https://coveralls.io/repos/github/casbin/redis-watcher/badge.svg?branch=master)](https://coveralls.io/github/casbin/redis-watcher?branch=master)
10-
[![Go Reference](https://pkg.go.dev/badge/github.com/casbin/redis-watcher/v2.svg)](https://pkg.go.dev/github.com/casbin/redis-watcher/v2)
11-
[![Release](https://img.shields.io/github/v/release/casbin/redis-watcher)](https://github.com/casbin/redis-watcher/releases/latest)
7+
[![Godoc](https://godoc.org/github.com/casbin/redis-watcher?status.svg)](https://godoc.org/github.com/casbin/redis-watcher)
8+
[![Release](https://img.shields.io/github/release/casbin/redis-watcher.svg)](https://github.com/casbin/redis-watcher/releases/latest)
9+
[![Discord](https://img.shields.io/discord/1022748306096537660?logo=discord&label=discord&color=5865F2)](https://discord.gg/S5UjpzGZjN)
10+
[![Sourcegraph](https://sourcegraph.com/github.com/casbin/redis-watcher/-/badge.svg)](https://sourcegraph.com/github.com/casbin/redis-watcher?badge)
1211

1312
Redis Watcher is a [Redis](http://redis.io) watcher for [Casbin](https://github.com/casbin/casbin).
1413

1514
## Installation
1615

17-
go get github.com/casbin/redis-watcher/v2
16+
```bash
17+
go get github.com/casbin/redis-watcher/v2
18+
```
1819

1920
## Simple Example
2021

2122
```go
2223
package main
2324

2425
import (
26+
"fmt"
2527
"log"
2628

2729
"github.com/casbin/casbin/v2"

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/casbin/redis-watcher/v2
22

3-
go 1.18
3+
go 1.23
44

55
require (
66
github.com/casbin/casbin/v2 v2.66.1

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw=
22
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
33
github.com/bsm/ginkgo/v2 v2.7.0 h1:ItPMPH90RbmZJt5GtkcNvIRuGEdwlBItdNVoyzaNQao=
4+
github.com/bsm/ginkgo/v2 v2.7.0/go.mod h1:AiKlXPm7ItEHNc/2+OkrNG4E0ITzojb9/xWzvQ9XZ9w=
45
github.com/bsm/gomega v1.26.0 h1:LhQm+AFcgV2M0WyKroMASzAzCAJVpAxQXv4SaI9a69Y=
6+
github.com/bsm/gomega v1.26.0/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
57
github.com/casbin/casbin/v2 v2.66.1 h1:HOFlZYTUYx8ktgv5fLNFo6hr4K18ogGFq/lnYXv1OfA=
68
github.com/casbin/casbin/v2 v2.66.1/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg=
79
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=

0 commit comments

Comments
 (0)