From a10c4aa4f172fdefea9536d9eb59774f4bc8a97f Mon Sep 17 00:00:00 2001 From: VM <112189277+sysvm@users.noreply.github.com> Date: Wed, 22 Nov 2023 10:49:05 +0800 Subject: [PATCH] docs: add some new status badges (#35) * docs: add some new status badges * ci: rename unit test yml file --------- Co-authored-by: VM --- .github/workflows/code-lint.yml | 2 +- .../{uint-test.yml => unit-test.yml} | 0 README.md | 9 ++++-- coingecko/methods_test.go | 32 ++++--------------- 4 files changed, 15 insertions(+), 28 deletions(-) rename .github/workflows/{uint-test.yml => unit-test.yml} (100%) diff --git a/.github/workflows/code-lint.yml b/.github/workflows/code-lint.yml index a46c890..fb8820d 100644 --- a/.github/workflows/code-lint.yml +++ b/.github/workflows/code-lint.yml @@ -1,4 +1,4 @@ -name: Golang Code Lint +name: Code Lint on: push: diff --git a/.github/workflows/uint-test.yml b/.github/workflows/unit-test.yml similarity index 100% rename from .github/workflows/uint-test.yml rename to .github/workflows/unit-test.yml diff --git a/README.md b/README.md index da99d72..02a4df1 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,13 @@ # CoinGecko API -[![Build Status](https://travis-ci.com/bufdata/coingecko-api.svg?branch=main)](https://travis-ci.com/bufdata/coingecko-api) +[![Go Version](https://img.shields.io/badge/go-v1.21.1-green.svg)](https://golang.org/dl/) +[![Code Lint](https://github.com/bufdata/coingecko-api/actions/workflows/code-lint.yml/badge.svg)](https://github.com/bufdata/coingecko-api/actions/workflows/code-lint.yml) +[![Unit Test](https://github.com/bufdata/coingecko-api/actions/workflows/unit-test.yml/badge.svg)](https://github.com/bufdata/coingecko-api/actions/workflows/unit-test.yml) [![GoDoc](https://pkg.go.dev/github.com/bufdata/coingecko-api?status.svg)](https://pkg.go.dev/github.com/bufdata/coingecko-api) -[![license](https://img.shields.io/badge/license-MIT-green)](https://github.com/bufdata/coingecko-api/blob/main/LICENSE) +[![goreports](https://goreportcard.com/badge/github.com/bufdata/coingecko-api)](https://goreportcard.com/report/github.com/bufdata/coingecko-api) +[![Codecov](https://codecov.io/gh/bufdata/coingecko-api/branch/master/graph/badge.svg)](https://codecov.io/gh/bufdata/coingecko-api) +[![license](https://img.shields.io/badge/license-MIT-blue)](https://github.com/bufdata/coingecko-api/blob/main/LICENSE) +[![Build Status](https://travis-ci.com/bufdata/coingecko-api.svg?branch=main)](https://travis-ci.com/bufdata/coingecko-api) [![](https://static.coingecko.com/s/coingecko-logo-d13d6bcceddbb003f146b33c2f7e8193d72b93bb343d38e392897c3df3e78bdd.png)](https://coingecko.com) [![](https://www.geckoterminal.com/_next/static/media/logo_dark.6b1547fe.png)](https://www.geckoterminal.com) diff --git a/coingecko/methods_test.go b/coingecko/methods_test.go index a3d34de..4e1557f 100644 --- a/coingecko/methods_test.go +++ b/coingecko/methods_test.go @@ -382,43 +382,25 @@ func TestClient_ListCoinsInfo(t *testing.T) { // wantedErrStr string // }{ // { -// name: "success", -// server: mockHTTPServer(t, &[]ListCoinsMarketsDataResponse{ -// { -// coinsStruct{ -// ID: "ethereum", -// Symbol: "eth", -// Name: "Ethereum", -// }, -// "", -// }, -// }), -// wantedIsErr: false, -// wantedResult: &[]ListCoinsMarketsDataResponse{ -// { -// coinsStruct{ -// ID: "ethereum", -// Symbol: "eth", -// Name: "Ethereum", -// }, -// nil, -// }, -// }, +// name: "success", +// server: nil, +// wantedIsErr: false, +// wantedResult: nil, // wantedErrStr: "", // }, // { // name: "failed to call api", -// server: mockErrorHTTPServer(t), +// server: mockErrorHTTPServer(t, ""), // wantedIsErr: true, // wantedResult: nil, // wantedErrStr: statusCode400ErrStr, // }, // { // name: "failed to unmarshal json", -// server: mockHTTPServer(t, []byte(`{"name":what?}`)), +// server: mockHTTPServer(t, "", invalidJSONString), // wantedIsErr: true, // wantedResult: nil, -// wantedErrStr: incorrectJSONTypeErrStr, +// wantedErrStr: invalidCharacterJSONErrStr, // }, // } // for _, tt := range cases {