Skip to content

Commit

Permalink
add travis
Browse files Browse the repository at this point in the history
  • Loading branch information
LyricTian committed Sep 14, 2018
1 parent 763a0a3 commit 20e3677
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
language: go
sudo: false
go_import_path: gopkg.in/go-oauth2/mysql.v3
go:
- 1.7
services:
- mysql
before_install:
- mysql -e 'CREATE DATABASE myapp_test;'
- go get -t -v ./...

script:
- go test -race -coverprofile=coverage.txt -covermode=atomic

after_success:
- bash <(curl -s https://codecov.io/bash)
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MySQL Storage for [OAuth 2.0](https://github.com/go-oauth2/oauth2)

[![ReportCard][reportcard-image]][reportcard-url] [![GoDoc][godoc-image]][godoc-url] [![License][license-image]][license-url]
[![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]

## Install

Expand Down Expand Up @@ -37,6 +37,10 @@ func main() {
Copyright (c) 2018 Lyric
```

[Build-Status-Url]: https://travis-ci.org/go-oauth2/mysql
[Build-Status-Image]: https://travis-ci.org/go-oauth2/mysql.svg?branch=master
[codecov-url]: https://codecov.io/gh/go-oauth2/mysql
[codecov-image]: https://codecov.io/gh/go-oauth2/mysql/branch/master/graph/badge.svg
[reportcard-url]: https://goreportcard.com/report/gopkg.in/go-oauth2/mysql.v3
[reportcard-image]: https://goreportcard.com/badge/gopkg.in/go-oauth2/mysql.v3
[godoc-url]: https://godoc.org/gopkg.in/go-oauth2/mysql.v3
Expand Down
2 changes: 1 addition & 1 deletion mysql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

const (
dsn = "root:123456@tcp(127.0.0.1:3306)/myapp_test?charset=utf8"
dsn = "root:@tcp(127.0.0.1:3306)/myapp_test?charset=utf8"
)

func TestTokenStore(t *testing.T) {
Expand Down

0 comments on commit 20e3677

Please sign in to comment.