Refactor - Poetry and Packages #56
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.9 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11.9' | |
| # Add caching for Poetry dependencies to speed up future runs | |
| cache: 'poetry' | |
| - name: Install Graphviz | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y graphviz graphviz-dev | |
| - name: Install Poetry | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install poetry | |
| - name: Install dependencies | |
| run: | | |
| # Single command to install all dependencies from the lock file | |
| poetry install | |
| - name: Lint with Ruff | |
| run: | | |
| poetry run ruff check . | |
| - name: Check formatting with Ruff | |
| run: | | |
| poetry run ruff format --check . | |
| - name: Type check with Mypy | |
| run: | | |
| # Use poetry run to ensure mypy runs in the correct environment | |
| poetry run mypy agent-core agent-engine agent-concurrent agent-persist agent-sim | |
| - name: Run tests with Pytest | |
| run: | | |
| poetry run pytest |