Skip to content

Commit

Permalink
New major version
Browse files Browse the repository at this point in the history
  • Loading branch information
snovichkov committed Feb 20, 2023
1 parent 98cada2 commit 6533075
Show file tree
Hide file tree
Showing 8 changed files with 627 additions and 254 deletions.
15 changes: 15 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
coverage:
range: 70..98
round: down
precision: 2
status:
project:
default:
enabled: yes
target: 89
if_not_found: success
if_ci_failed: error
patch:
default:
enabled: yes
target: 70
34 changes: 34 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Unit Tests

on:
push:
branches: [ "master" ]

pull_request:
branches: [ "master" ]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
go-version:
- 1.18
- 1.19

steps:
- uses: actions/checkout@v3

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

- name: Run Tests
run: bash .scripts/test.sh

- name: Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
15 changes: 15 additions & 0 deletions .scripts/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

set -e

if [[ -f coverage.txt ]]; then
rm coverage.txt
fi

for d in $(go list ./... | grep -v ditest); do
go test -coverprofile=profile.out -coverpkg=./... -covermode=atomic "$d"
if [[ -f profile.out ]]; then
cat profile.out >>coverage.txt
rm profile.out
fi
done
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# GoZix GoRedis

[documentation-img]: https://img.shields.io/badge/godoc-reference-blue.svg?color=24B898&style=for-the-badge&logo=go&logoColor=ffffff
[documentation-url]: https://pkg.go.dev/github.com/gozix/goredis/v4
[license-img]: https://img.shields.io/github/license/gozix/goredis.svg?style=for-the-badge
[license-url]: https://github.com/gozix/goredis/blob/master/LICENSE
[release-img]: https://img.shields.io/github/tag/gozix/goredis.svg?label=release&color=24B898&logo=github&style=for-the-badge
[release-url]: https://github.com/gozix/goredis/releases/latest
[build-status-img]: https://img.shields.io/github/actions/workflow/status/gozix/goredis/go.yml?logo=github&style=for-the-badge
[build-status-url]: https://github.com/gozix/goredis/actions
[go-report-img]: https://img.shields.io/badge/go%20report-A%2B-green?style=for-the-badge
[go-report-url]: https://goreportcard.com/report/github.com/gozix/goredis
[code-coverage-img]: https://img.shields.io/codecov/c/github/gozix/goredis.svg?style=for-the-badge&logo=codecov
[code-coverage-url]: https://codecov.io/gh/gozix/goredis

[![License][license-img]][license-url]
[![Documentation][documentation-img]][documentation-url]

[![Release][release-img]][release-url]
[![Build Status][build-status-img]][build-status-url]
[![Go Report Card][go-report-img]][go-report-url]
[![Code Coverage][code-coverage-img]][code-coverage-url]

The bundle provide a GoRedis integration to GoZix application.

## Installation

```shell
go get github.com/gozix/goredis/v4
```

## Dependencies

* [viper](https://github.com/gozix/viper)
Expand Down Expand Up @@ -27,3 +56,11 @@
"username" field is optional and ignored if empty
"password" field is optional and ignored if empty
"db" field is optional. Default is 0

## Documentation

You can find documentation on [pkg.go.dev][documentation-url] and read source code if needed.

## Questions

If you have any questions, feel free to create an issue.
34 changes: 29 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
module github.com/gozix/goredis/v3
module github.com/gozix/goredis/v4

go 1.16
go 1.18

require (
github.com/go-redis/redis/v8 v8.8.0
github.com/gozix/viper/v2 v2.1.1
github.com/sarulabs/di/v2 v2.4.2
github.com/go-redis/redis/v8 v8.11.5
github.com/gozix/di v1.0.0
github.com/gozix/glue/v3 v3.0.0
github.com/gozix/viper/v3 v3.0.0
github.com/spf13/viper v1.15.0
)

require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/cobra v1.6.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 6533075

Please sign in to comment.