From a842b13d25d5e846d550d1db99baa7e071f07d8b Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 14 Apr 2020 18:25:02 +0200 Subject: [PATCH] chore: enhance CI process (#20) * chore: enhance CI process * chore: enhance ci * chore: typo --- .codecov/codecov.yml | 22 +++++++++++++++++++ .../.dependabot => .dependabot}/config.yml | 0 .github/workflows/release.yml | 10 ++++++--- .releaserc.js | 5 +---- README.md | 1 + 5 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 .codecov/codecov.yml rename {.github/workflows/.dependabot => .dependabot}/config.yml (100%) diff --git a/.codecov/codecov.yml b/.codecov/codecov.yml new file mode 100644 index 0000000..8104953 --- /dev/null +++ b/.codecov/codecov.yml @@ -0,0 +1,22 @@ +codecov: + notify: + require_ci_to_pass: yes +coverage: + precision: 2 + round: down + range: "70...100" + status: + project: yes + patch: yes + changes: no +parsers: + gcov: + branch_detection: + conditional: yes + loop: yes + method: no + macro: no +comment: + layout: "header, diff" + behavior: default + require_changes: no \ No newline at end of file diff --git a/.github/workflows/.dependabot/config.yml b/.dependabot/config.yml similarity index 100% rename from .github/workflows/.dependabot/config.yml rename to .dependabot/config.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a2ae2f8..42c3ab0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,12 +8,16 @@ jobs: go: ['1.11', '1.12', '1.13', '1.14'] name: Go ${{ matrix.go }} test steps: - - uses: actions/checkout@master + - uses: actions/checkout@v2 - name: Setup go - uses: actions/setup-go@v1 + uses: actions/setup-go@v2-beta with: go-version: ${{ matrix.go }} - - run: go test -race ./pkg/... + - run: go test -race -v -coverprofile=profile.cov ./pkg/... + - uses: codecov/codecov-action@v1 + with: + file: ./profile.cov + name: codecov-go release: runs-on: ubuntu-18.04 needs: [test] diff --git a/.releaserc.js b/.releaserc.js index 93a0158..d9c7f99 100644 --- a/.releaserc.js +++ b/.releaserc.js @@ -3,9 +3,6 @@ module.exports = { plugins: [ "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", - "@semantic-release/github", - ["@semantic-release/exec", { - "prepareCmd": "echo '::set-env name=CAOS_NEXT_VERSION::v${nextRelease.version}'" - }], + "@semantic-release/github" ] }; \ No newline at end of file diff --git a/README.md b/README.md index 13dc520..c1d7919 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ [![license](https://badgen.net/github/license/caos/oidc/)](https://github.com/caos/oidc/blob/master/LICENSE) [![release](https://badgen.net/github/release/caos/oidc/stable)](https://github.com/caos/oidc/releases) [![Go Report Card](https://goreportcard.com/badge/github.com/caos/oidc)](https://goreportcard.com/report/github.com/caos/oidc) +[![codecov](https://codecov.io/gh/caos/oidc/branch/master/graph/badge.svg)](https://codecov.io/gh/caos/oidc) > This project is in alpha state. It can AND will continue breaking until version 1.0.0 is released