diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..90f44a9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,47 @@ +name: CI + +on: + push: + branches: ["master"] + pull_request: + branches: ["master"] + +jobs: + build-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Install Poetry + run: python -m pip install --upgrade pip poetry + + - name: Install dependencies + run: | + poetry config virtualenvs.create false + poetry install --with dev + + - name: Install Playwright browsers + run: poetry run playwright install --with-deps chromium + + - name: Build package + run: poetry build + + - name: Static analysis + run: poetry run python -m compileall src + + - name: Lint (errors only) + run: | + python -m pip install pylint + poetry run pylint --errors-only src/autometabuilder + + - name: Unit tests + run: PYTHONPATH=src poetry run pytest tests/test_main.py tests/test_metadata.py tests/test_roadmap.py + + - name: UI tests + run: PYTHONPATH=src poetry run pytest tests/ui diff --git a/ROADMAP.md b/ROADMAP.md index 72c7944..141604d 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -16,7 +16,7 @@ - [x] **Automated Testing**: Integration with test runners to verify changes before PR. - [x] **Linting Integration**: Automatically run and fix linting issues. - [x] **Multi-Model Support**: Easily switch between different LLM providers. -- [ ] **CI/CD Integration**: Github Actions to run AutoMetabuilder on schedule or trigger. +- [x] **CI/CD Integration**: Github Actions to run AutoMetabuilder on schedule or trigger. ## Phase 4: Optimization & Scalability - [x] **Dockerization**: Provide a Dockerfile and docker-compose for easy environment setup. Added `run_docker_task` tool. diff --git a/tests/test_roadmap.py b/tests/test_roadmap.py index a269b74..182e18d 100644 --- a/tests/test_roadmap.py +++ b/tests/test_roadmap.py @@ -1,6 +1,6 @@ import os import unittest -from src.autometabuilder.roadmap_utils import is_mvp_reached, update_roadmap +from autometabuilder.roadmap_utils import is_mvp_reached, update_roadmap class TestRoadmap(unittest.TestCase): def setUp(self):