Refactor - Poetry and Packages #55
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # .github/workflows/ci.yml | |
| name: Python Application CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11.9' | |
| - name: Install Graphviz | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y graphviz graphviz-dev libgraphviz-dev pkg-config | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| # Install ALL packages in editable mode to build the correct environment | |
| # This makes all sub-repos available. | |
| pip install -e ./agent-core -e ./agent-concurrent -e ./agent-engine -e ./agent-persist -e ./agent-sim | |
| pip install -e ".[dev]" | |
| - name: Lint with Ruff | |
| run: | | |
| ruff check . | |
| - name: Check formatting with Ruff | |
| run: | | |
| # Have ruff format check the entire project, not just a single 'src' folder. | |
| ruff format --diff . | |
| - name: Type check with Mypy | |
| run: | | |
| # Only check packages that have Python files and aren't excluded | |
| mypy agent-core/src agent-engine/src agent-concurrent/src agent-persist/src | |
| - name: Run tests with Pytest | |
| run: | | |
| # This command is fine. Pytest will now work because the 'Install dependencies' | |
| # step has correctly set up the environment. | |
| pytest |