Skip to content

Commit

Permalink
Update v2 Readme [ch32651] (#46)
Browse files Browse the repository at this point in the history
* Update readme & other references

* Run GH actions on v2 branch

* Fix CC report generation

* Added go 1.6 in build matrix
  • Loading branch information
hassansin committed Jul 30, 2021
1 parent b80d5b6 commit e69b5f8
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: Run specs and generate Code Climate report
on:
push:
branches: [ main ]
branches: [ main, v2 ]
pull_request:
branches: [ main ]
branches: [ main, v2 ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go-versions: ['1.11', '1.12', '1.13', '1.14']
go-versions: ['1.11', '1.12', '1.13', '1.14', '1.16' ]
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
echo "mode: set" > c.out
grep -h -v "^mode:" ./*.cover >> c.out
rm -f *.cover
sed -i 's#^github.com/chartmogul/chartmogul-go/##g' c.out
sed -i 's#^github.com/chartmogul/chartmogul-go/v2/##g' c.out
- name: Send Report to Code Climate
env:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<p align="center"><code>chartmogul-go</code> provides convenient Golang bindings for <a href="https://dev.chartmogul.com">ChartMogul's API</a>.</p>
<p align="center">
<a href="https://travis-ci.org/chartmogul/chartmogul-go"><img src="https://travis-ci.org/chartmogul/chartmogul-go.svg?branch=main" alt="Build Status"/></a>
<a href="https://github.com/chartmogul/chartmogul-go/tree/v2"><img src="https://github.com/chartmogul/chartmogul-go/actions/workflows/test.yml/badge.svg?branch=v2" alt="Build Status"/></a>
</p>
<hr>

Expand All @@ -26,23 +26,23 @@
<hr>
<br>

[![GoDoc](https://godoc.org/github.com/golang/gddo?status.svg)](http://godoc.org/github.com/chartmogul/chartmogul-go)
[![Go Reference](https://pkg.go.dev/badge/github.com/chartmogul/chartmogul-go/v2.svg)](https://pkg.go.dev/github.com/chartmogul/chartmogul-go/v2)
[![Go Report Card](https://goreportcard.com/badge/github.com/chartmogul/chartmogul-go)](https://goreportcard.com/report/github.com/chartmogul/chartmogul-go)

## Installation

This library requires Go 1.11 or above.

```sh
go get github.com/chartmogul/chartmogul-go
go get github.com/chartmogul/chartmogul-go/v2
```

## Configuration

First create the `API` struct by passing your account token and secret key, available from the administration section of your ChartMogul account.

```go
import cm "github.com/chartmogul/chartmogul-go"
import cm "github.com/chartmogul/chartmogul-go/v2"

api := cm.API{
AccountToken: os.Getenv("CHARTMOGUL_ACCOUNT_TOKEN"),
Expand Down
2 changes: 1 addition & 1 deletion genmocks.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
mkdir -p mock_chartmogul ; mockgen github.com/chartmogul/chartmogul-go IApi > mock_chartmogul/chartmogul.go
mkdir -p mock_chartmogul ; mockgen github.com/chartmogul/chartmogul-go/v2 IApi > mock_chartmogul/chartmogul.go
39 changes: 34 additions & 5 deletions mock_chartmogul/chartmogul.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e69b5f8

Please sign in to comment.