Skip to content

Commit 47437b6

Browse files
committed
Add codecov workflow
Signed-off-by: mehabhalodiya <mehabhalodiya@gmail.com>
1 parent 4ddd3d4 commit 47437b6

2 files changed

Lines changed: 56 additions & 0 deletions

File tree

.codecov.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
coverage:
2+
status:
3+
patch: off
4+
project:
5+
default:
6+
target: auto
7+
threshold: 0.2%
8+
removed_code_behavior: adjust_base

.github/workflows/pr-checks.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: static checks
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- "master"
7+
pull_request:
8+
branches:
9+
- "*"
10+
11+
jobs:
12+
lint:
13+
name: Code Quality
14+
runs-on: ubuntu-20.04
15+
16+
steps:
17+
- name: Set up Go
18+
uses: actions/setup-go@v4
19+
with:
20+
go-version: "^1.18"
21+
22+
- name: Checkout repo
23+
uses: actions/checkout@v3
24+
25+
unit:
26+
name: Unit Tests with Code coverage
27+
runs-on: ubuntu-20.04
28+
29+
steps:
30+
- name: Set up Go
31+
uses: actions/setup-go@v4
32+
with:
33+
go-version: "^1.18"
34+
35+
- name: Checkout Git Repository
36+
uses: actions/checkout@v3
37+
38+
- name: Unit Tests with Code Coverage
39+
run: |
40+
make test
41+
42+
- name: Upload Code Coverage Report
43+
uses: codecov/codecov-action@v3
44+
with:
45+
token: ${{ secrets.CODECOV_TOKEN }}
46+
file: cover.out
47+
verbose: true
48+
fail_ci_if_error: true

0 commit comments

Comments
 (0)