diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8c5442a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: CI + +on: + push: + branches: + - main + - staging + pull_request: + branches: + - main + - staging + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Run tests + run: pytest --cov=. --cov-report xml + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage.xml + fail_ci_if_error: true diff --git a/README.md b/README.md new file mode 100644 index 0000000..ebd64dc --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# OpenBrand + +![CI](https://github.com/OpenBrandHQ/GapIntelligence/actions/workflows/ci.yml/badge.svg) +[![codecov](https://codecov.io/gh/OpenBrandHQ/GapIntelligence/branch/main/graph/badge.svg)](https://codecov.io/gh/OpenBrandHQ/GapIntelligence) + +This repository contains configuration files and documentation used by OpenBrand. diff --git a/dummy.py b/dummy.py new file mode 100644 index 0000000..ad81f48 --- /dev/null +++ b/dummy.py @@ -0,0 +1,3 @@ +def add(a, b): + """Return the sum of a and b.""" + return a + b diff --git a/profile/README.md b/profile/README.md index 7c82d21..b904277 100644 --- a/profile/README.md +++ b/profile/README.md @@ -3,6 +3,10 @@ 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. +![CI](https://github.com/OpenBrandHQ/GapIntelligence/actions/workflows/ci.yml/badge.svg) +[![codecov](https://codecov.io/gh/OpenBrandHQ/GapIntelligence/branch/main/graph/badge.svg)](https://codecov.io/gh/OpenBrandHQ/GapIntelligence) + + **Official Website:** [openbrand.com](https://openbrand.com) ## About OpenBrand diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..9955dec --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +pytest +pytest-cov diff --git a/tests/test_dummy.py b/tests/test_dummy.py new file mode 100644 index 0000000..386b5c3 --- /dev/null +++ b/tests/test_dummy.py @@ -0,0 +1,4 @@ +from dummy import add + +def test_add(): + assert add(1, 2) == 3