Skip to content

Commit 886fa95

Browse files
Merge pull request #1 from GapIntelligence/codex/add-ci-and-codecov-badges-to-readme
Add CI with Codecov badges
2 parents 6582245 + 58fc618 commit 886fa95

6 files changed

Lines changed: 57 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- staging
8+
pull_request:
9+
branches:
10+
- main
11+
- staging
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.11'
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install -r requirements.txt
29+
30+
- name: Run tests
31+
run: pytest --cov=. --cov-report xml
32+
33+
- name: Upload coverage to Codecov
34+
uses: codecov/codecov-action@v4
35+
with:
36+
token: ${{ secrets.CODECOV_TOKEN }}
37+
files: ./coverage.xml
38+
fail_ci_if_error: true

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# OpenBrand
2+
3+
![CI](https://github.com/OpenBrandHQ/GapIntelligence/actions/workflows/ci.yml/badge.svg)
4+
[![codecov](https://codecov.io/gh/OpenBrandHQ/GapIntelligence/branch/main/graph/badge.svg)](https://codecov.io/gh/OpenBrandHQ/GapIntelligence)
5+
6+
This repository contains configuration files and documentation used by OpenBrand.

dummy.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
def add(a, b):
2+
"""Return the sum of a and b."""
3+
return a + b

profile/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33

44
Welcome to the OpenBrand GitHub repository. OpenBrand was formed through the integration of industry-leading companies: Gap Intelligence, Deep.ad, Traqline, and Competitive Promotion Report. We are committed to bringing clarity to the market through superior data analytics, web crawling technology, and LLM-driven insights.
55

6+
![CI](https://github.com/OpenBrandHQ/GapIntelligence/actions/workflows/ci.yml/badge.svg)
7+
[![codecov](https://codecov.io/gh/OpenBrandHQ/GapIntelligence/branch/main/graph/badge.svg)](https://codecov.io/gh/OpenBrandHQ/GapIntelligence)
8+
9+
610
**Official Website:** [openbrand.com](https://openbrand.com)
711

812
## About OpenBrand

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pytest
2+
pytest-cov

tests/test_dummy.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from dummy import add
2+
3+
def test_add():
4+
assert add(1, 2) == 3

0 commit comments

Comments
 (0)