From a15ed69b355238252bfb00d3486a7deb4eeea17f Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sun, 22 Aug 2021 22:08:05 +0100 Subject: [PATCH 1/2] ci(github): add coverage reports via CodeClimate --- .github/workflows/ci.yml | 50 ++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b24bdd4..3ad5eb2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,31 +63,31 @@ jobs: # github-token: ${{ secrets.GITHUB_TOKEN }} # auto-push: false - # cov: - # name: Coverage - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-go@v2 - # with: - # go-version: 1.15 - # - uses: actions/cache@v2 - # with: - # path: ~/go/pkg/mod - # key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - # restore-keys: | - # ${{ runner.os }}-go- - # - name: Publish coverage - # uses: paambaati/codeclimate-action@v2.7.4 - # env: - # VERBOSE: "true" - # GOMAXPROCS: 4 - # CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} - # with: - # coverageCommand: make cov - # prefix: github.com/${{ github.repository }} - # coverageLocations: | - # ${{ github.workspace }}/coverage.out:gocov + cov: + name: Coverage + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: 1.15 + - uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Publish coverage + uses: paambaati/codeclimate-action@v2.7.4 + env: + VERBOSE: "true" + GOMAXPROCS: 4 + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + with: + coverageCommand: make cov + prefix: github.com/${{ github.repository }} + coverageLocations: | + ${{ github.workspace }}/coverage.out:gocov test: name: Test From ce8f8dfabe9b20de73a4f4859f6a6ff0fbe374eb Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sun, 22 Aug 2021 22:10:33 +0100 Subject: [PATCH 2/2] docs(readme): add status badges --- README.md | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c1c5bf9..8e4620b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- romdo/go-validate + go-validate

@@ -9,7 +9,31 @@

---- +

+ + Go Reference + + + GitHub tag (latest SemVer) + + + Actions Status + + + Coverage + + + + + + GitHub pull requests + + + License Status + +

Add validation to any type, by simply implementing the `Validatable` interface: