Skip to content

Commit

Permalink
Add codecov workflow
Browse files Browse the repository at this point in the history
Signed-off-by: mehabhalodiya <mehabhalodiya@gmail.com>
  • Loading branch information
mehabhalodiya committed Aug 29, 2023
1 parent 4ddd3d4 commit 47437b6
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
coverage:
status:
patch: off
project:
default:
target: auto
threshold: 0.2%
removed_code_behavior: adjust_base
48 changes: 48 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: static checks
on:
workflow_dispatch:
push:
branches:
- "master"
pull_request:
branches:
- "*"

jobs:
lint:
name: Code Quality
runs-on: ubuntu-20.04

steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "^1.18"

- name: Checkout repo
uses: actions/checkout@v3

unit:
name: Unit Tests with Code coverage
runs-on: ubuntu-20.04

steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "^1.18"

- name: Checkout Git Repository
uses: actions/checkout@v3

- name: Unit Tests with Code Coverage
run: |
make test
- name: Upload Code Coverage Report
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: cover.out
verbose: true
fail_ci_if_error: true

0 comments on commit 47437b6

Please sign in to comment.