diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..479fdd9 --- /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: python -m 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..f6ceaaf --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +# OpenBrand + +![CI](https://github.com/GapIntelligence/.github/actions/workflows/ci.yml/badge.svg) +[![codecov](https://codecov.io/gh/GapIntelligence/.github/graph/badge.svg?token=GQXX40CMBF)](https://codecov.io/gh/GapIntelligence/.github) + +This repository contains configuration files and documentation used by OpenBrand. + +## Documentation + +For an overview of the organization, visit the [profile README](profile/README.md). +The MkDocs site is built from the files in the [`docs/`](docs/) directory. + +## Development + +This repository uses [MkDocs](https://www.mkdocs.org/) for documentation. +Run the test suite (which also builds the site) with: + +```bash +python -m pytest -q +``` diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..51e2b23 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,7 @@ +# OpenBrand Documentation + +This site contains documentation about the OpenBrand organization. + +For repository details, see the [main README](../README.md). + +Learn more about our organization on the [profile page](profile.md). diff --git a/docs/profile.md b/docs/profile.md new file mode 100644 index 0000000..0722531 --- /dev/null +++ b/docs/profile.md @@ -0,0 +1,3 @@ +# OpenBrand Profile + +This page mirrors the information in [profile/README.md](../profile/README.md). diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..6de3a16 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,5 @@ +site_name: OpenBrand Docs +nav: + - Home: index.md + - Profile: profile.md +docs_dir: docs diff --git a/profile/README.md b/profile/README.md index 7c82d21..0454e9c 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/GapIntelligence/.github/actions/workflows/ci.yml/badge.svg) +[![codecov](https://codecov.io/gh/GapIntelligence/.github/graph/badge.svg?token=GQXX40CMBF)](https://codecov.io/gh/GapIntelligence/.github) + + **Official Website:** [openbrand.com](https://openbrand.com) ## About OpenBrand @@ -55,4 +59,6 @@ To get started with development, please ensure you have access to the necessary --- +For repository configuration details, see the [main README](../README.md). + Thank you for contributing to OpenBrand's continued success! diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..a8f1632 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +pytest +pytest-cov +mkdocs diff --git a/tests/test_mkdocs.py b/tests/test_mkdocs.py new file mode 100644 index 0000000..eff575a --- /dev/null +++ b/tests/test_mkdocs.py @@ -0,0 +1,15 @@ +import subprocess +from pathlib import Path + + +def test_mkdocs_build(tmp_path: Path) -> None: + """Ensure the mkdocs site builds successfully.""" + site_dir = tmp_path / "site" + result = subprocess.run([ + "mkdocs", + "build", + "--site-dir", + str(site_dir), + ], capture_output=True, text=True) + assert result.returncode == 0, result.stderr + assert site_dir.exists() diff --git a/visibility.json b/visibility.json new file mode 100644 index 0000000..1c5247f --- /dev/null +++ b/visibility.json @@ -0,0 +1,6 @@ +{ + "schemaVersion": 1, + "label": "repo", + "message": "public", + "color": "brightgreen" +}