From 54d0f9833bc9a20337d9840ccef29d2d3b468f00 Mon Sep 17 00:00:00 2001 From: Eduardo Chiarotti Date: Tue, 8 Oct 2024 17:34:21 -0300 Subject: [PATCH] feat: update tests and github CI --- .github/workflows/tests.yml | 22 +++++++++++----------- tests/cli/deploy/test_deploy_main.py | 16 ++++++---------- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dcd3e2f1e..04f6693d0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,24 +9,24 @@ env: OPENAI_API_KEY: fake-api-key jobs: - deploy: + tests: runs-on: ubuntu-latest timeout-minutes: 15 - steps: - name: Checkout code uses: actions/checkout@v4 - - name: Setup Python - uses: actions/setup-python@v4 + - name: Install uv + uses: astral-sh/setup-uv@v3 with: - python-version: "3.11.9" + enable-cache: true - - name: Install Requirements - run: | - set -e - pip install poetry - poetry install + + - name: Set up Python + run: uv python install 3.11.9 + + - name: Install the project + run: uv sync --dev - name: Run tests - run: poetry run pytest + run: uv run pytest tests diff --git a/tests/cli/deploy/test_deploy_main.py b/tests/cli/deploy/test_deploy_main.py index 0d30b4af7..385dbb8a5 100644 --- a/tests/cli/deploy/test_deploy_main.py +++ b/tests/cli/deploy/test_deploy_main.py @@ -228,13 +228,11 @@ class TestDeployCommand(unittest.TestCase): "builtins.open", new_callable=unittest.mock.mock_open, read_data=""" - [tool.poetry] + [project] name = "test_project" version = "0.1.0" - - [tool.poetry.dependencies] - python = "^3.10" - crewai = { extras = ["tools"], version = ">=0.51.0,<1.0.0" } + requires-python = ">=3.10,<=3.13" + dependencies = ["crewai"] """, ) def test_get_project_name_python_310(self, mock_open): @@ -248,13 +246,11 @@ class TestDeployCommand(unittest.TestCase): "builtins.open", new_callable=unittest.mock.mock_open, read_data=""" - [tool.poetry] + [project] name = "test_project" version = "0.1.0" - - [tool.poetry.dependencies] - python = "^3.11" - crewai = { extras = ["tools"], version = ">=0.51.0,<1.0.0" } + requires-python = ">=3.10,<=3.13" + dependencies = ["crewai"] """, ) def test_get_project_name_python_311_plus(self, mock_open):