Skip to content

Commit

Permalink
codecov setup
Browse files Browse the repository at this point in the history
  • Loading branch information
deveshsangwanPB committed Jan 30, 2024
1 parent ccbbb8b commit 3713143
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/Codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Run Tests

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "20"

- name: Install Dependencies
run: npm i

- name: Run Build
run: npm run build

- name: Run Tests
run: npm run test:coverage

- name: Upload Coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/lcov.info
flags: unittests
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ Welcome to the Cricket Score API! This project is designed to provide real-time

Our aim is to maintain high code coverage to ensure the quality of the project. Here are our current stats:

![Functions](https://img.shields.io/badge/functions-96.07%25-brightgreen.svg?style=flat)
![Lines](https://img.shields.io/badge/lines-91.66%25-brightgreen.svg?style=flat)
[![codecov](https://codecov.io/gh/deveshsangwan/cricketScoreApi/graph/badge.svg?token=A3JMLLNTG4)](https://codecov.io/gh/deveshsangwan/cricketScoreApi)
![Functions](https://img.shields.io/badge/functions-98.03%25-brightgreen.svg?style=flat)
![Lines](https://img.shields.io/badge/lines-92.33%25-brightgreen.svg?style=flat)

## Getting Started

Expand Down

0 comments on commit 3713143

Please sign in to comment.