|
1 | 1 | # PostgreSQL Storage for [OAuth 2.0](https://github.com/go-oauth2/oauth2) |
2 | 2 |
|
3 | | -[![Build][Build-Status-Image]][Build-Status-Url] [![Codecov][codecov-image]][codecov-url] [![ReportCard][reportcard-image]][reportcard-url] [![GoDoc][godoc-image]][godoc-url] [![License][license-image]][license-url] |
| 3 | +[](https://godoc.org/github.com/vgarvardt/go-oauth2-pg) |
| 4 | +[](https://codecov.io/gh/vgarvardt/go-oauth2-pg) |
| 5 | +[](https://goreportcard.com/report/github.com/vgarvardt/go-oauth2-pg) |
| 6 | +[](http://opensource.org/licenses/MIT) |
4 | 7 |
|
5 | 8 | ## Install |
6 | 9 |
|
7 | 10 | ```bash |
8 | | -$ go get -u -v github.com/vgarvardt/go-oauth2-pg |
| 11 | +$ go get -u github.com/vgarvardt/go-oauth2-pg |
9 | 12 | ``` |
10 | 13 |
|
11 | 14 | ## PostgreSQL drivers |
@@ -48,31 +51,19 @@ func main() { |
48 | 51 |
|
49 | 52 | ## How to run tests |
50 | 53 |
|
51 | | -You will need running PostgreSQL instance. E.g. the one running in docker and exposing a port to a host system |
| 54 | +## Testing |
52 | 55 |
|
53 | | -```bash |
54 | | -docker run --rm -p 5432:5432 -it -e POSTGRES_PASSWORD=oauth2 -e POSTGRES_USER=oauth2 -e POSTGRES_DB=oauth2 postgres:10 |
55 | | -``` |
| 56 | +Linter and tests are running for every Pul Request, but it is possible to run linter |
| 57 | +and tests locally using `docker` and `make`. |
56 | 58 |
|
57 | | -Now you can run tests using the running PostgreSQL instance using `PG_URI` environment variable |
| 59 | +Run linter: `make link`. This command runs liner in docker container with the project |
| 60 | +source code mounted. |
58 | 61 |
|
59 | | -```bash |
60 | | -PG_URI=postgres://oauth2:oauth2@localhost:5432/oauth2?sslmode=disable go test -cover ./... |
61 | | -``` |
| 62 | +Run tests: `make test`. This command runs project dependencies in docker containers |
| 63 | +if they are not started yet and runs go tests with coverage. |
62 | 64 |
|
63 | 65 | ## MIT License |
64 | 66 |
|
65 | 67 | ``` |
66 | | -Copyright (c) 2019 Vladimir Garvardt |
| 68 | +Copyright (c) 2020 Vladimir Garvardt |
67 | 69 | ``` |
68 | | - |
69 | | -[Build-Status-Url]: https://travis-ci.org/vgarvardt/go-oauth2-pg |
70 | | -[Build-Status-Image]: https://travis-ci.org/vgarvardt/go-oauth2-pg.svg?branch=master |
71 | | -[codecov-url]: https://codecov.io/gh/vgarvardt/go-oauth2-pg |
72 | | -[codecov-image]: https://codecov.io/gh/vgarvardt/go-oauth2-pg/branch/master/graph/badge.svg |
73 | | -[reportcard-url]: https://goreportcard.com/report/github.com/vgarvardt/go-oauth2-pg |
74 | | -[reportcard-image]: https://goreportcard.com/badge/github.com/vgarvardt/go-oauth2-pg |
75 | | -[godoc-url]: https://godoc.org/github.com/vgarvardt/go-oauth2-pg |
76 | | -[godoc-image]: https://godoc.org/github.com/vgarvardt/go-oauth2-pg?status.svg |
77 | | -[license-url]: http://opensource.org/licenses/MIT |
78 | | -[license-image]: https://img.shields.io/npm/l/express.svg |
0 commit comments