From 6bbfce4c5e80a63f516dd695a07a26336a8e579e Mon Sep 17 00:00:00 2001 From: aakrem Date: Mon, 6 May 2024 21:51:29 +0200 Subject: [PATCH 01/10] workflow for cli commands --- .github/workflows/agenta-cli-test.yml | 44 +++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/agenta-cli-test.yml diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml new file mode 100644 index 000000000..104d099ac --- /dev/null +++ b/.github/workflows/agenta-cli-test.yml @@ -0,0 +1,44 @@ +name: Agenta CLI Workflow + +on: + pull_request: + paths: + - "agenta-backend/**" + - "agenta-cli/**" + +jobs: + run-agenta: + runs-on: ubuntu-latest + environment: oss + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python 3.9 + uses: actions/setup-python@v5 + with: + python-version: '3.9' + + - name: Install Poetry + run: | + curl -sSL https://install.python-poetry.org | python3 - + + - name: Configure Poetry + run: | + poetry config virtualenvs.in-project true + + - name: Install dependencies + run: | + cd agenta-cli + poetry install + + - name: Initialize Agenta + env: + BACKEND_HOST: ${{ secrets.BACKEND_HOST }} + run: | + cd ../examples/baby_name_generator + poetry run agenta init --app_name woooo --backend_host $BACKEND_HOST + + - name: Serve Application + run: | + poetry run agenta variant serve --file_name app.py \ No newline at end of file From 63e824264f24fb12b60e80b78de309f3c4e3c39f Mon Sep 17 00:00:00 2001 From: aakrem Date: Mon, 6 May 2024 21:53:37 +0200 Subject: [PATCH 02/10] comment paths to test --- .github/workflows/agenta-cli-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index 104d099ac..0d6a755ba 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -2,9 +2,9 @@ name: Agenta CLI Workflow on: pull_request: - paths: - - "agenta-backend/**" - - "agenta-cli/**" + # paths: + # - "agenta-backend/**" + # - "agenta-cli/**" jobs: run-agenta: From b2f349ed197d68dbf5918a1506c354d678a3bdfb Mon Sep 17 00:00:00 2001 From: aakrem Date: Mon, 6 May 2024 21:55:25 +0200 Subject: [PATCH 03/10] fix path --- .github/workflows/agenta-cli-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index 0d6a755ba..4a84e3b3b 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -36,7 +36,8 @@ jobs: env: BACKEND_HOST: ${{ secrets.BACKEND_HOST }} run: | - cd ../examples/baby_name_generator + pwd + cd ./../examples/baby_name_generator poetry run agenta init --app_name woooo --backend_host $BACKEND_HOST - name: Serve Application From 36a9af5dfad98249326f3832a6e7a3636af577a0 Mon Sep 17 00:00:00 2001 From: aakrem Date: Mon, 6 May 2024 21:56:28 +0200 Subject: [PATCH 04/10] fix path --- .github/workflows/agenta-cli-test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index 4a84e3b3b..614cbe73d 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -36,8 +36,7 @@ jobs: env: BACKEND_HOST: ${{ secrets.BACKEND_HOST }} run: | - pwd - cd ./../examples/baby_name_generator + cd ./examples/baby_name_generator poetry run agenta init --app_name woooo --backend_host $BACKEND_HOST - name: Serve Application From 71e4e6b2b7f3c0b143c9da230adc232b3149b2dd Mon Sep 17 00:00:00 2001 From: aakrem Date: Mon, 6 May 2024 22:02:53 +0200 Subject: [PATCH 05/10] fix path --- .github/workflows/agenta-cli-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index 614cbe73d..0b5c4300c 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -36,7 +36,7 @@ jobs: env: BACKEND_HOST: ${{ secrets.BACKEND_HOST }} run: | - cd ./examples/baby_name_generator + cd examples/baby_name_generator poetry run agenta init --app_name woooo --backend_host $BACKEND_HOST - name: Serve Application From acc76f190f0969d62373c87d2fc05f56b6fa65a3 Mon Sep 17 00:00:00 2001 From: aakrem Date: Mon, 6 May 2024 22:07:18 +0200 Subject: [PATCH 06/10] remove poetry run --- .github/workflows/agenta-cli-test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index 0b5c4300c..7333caa23 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -31,14 +31,17 @@ jobs: run: | cd agenta-cli poetry install + poetry shell - name: Initialize Agenta env: BACKEND_HOST: ${{ secrets.BACKEND_HOST }} run: | + pwd + ls agenta cd examples/baby_name_generator - poetry run agenta init --app_name woooo --backend_host $BACKEND_HOST + agenta init --app_name woooo --backend_host $BACKEND_HOST - name: Serve Application run: | - poetry run agenta variant serve --file_name app.py \ No newline at end of file + agenta variant serve --file_name app.py \ No newline at end of file From 8fcc861a8c8d2c39341bfdc17992dc1e93dd5a62 Mon Sep 17 00:00:00 2001 From: aakrem Date: Mon, 6 May 2024 22:09:44 +0200 Subject: [PATCH 07/10] remove poetry shell --- .github/workflows/agenta-cli-test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index 7333caa23..29abe3689 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -31,7 +31,6 @@ jobs: run: | cd agenta-cli poetry install - poetry shell - name: Initialize Agenta env: @@ -40,8 +39,8 @@ jobs: pwd ls agenta cd examples/baby_name_generator - agenta init --app_name woooo --backend_host $BACKEND_HOST + poetry run agenta init --app_name woooo --backend_host $BACKEND_HOST - name: Serve Application run: | - agenta variant serve --file_name app.py \ No newline at end of file + poetry run agenta variant serve --file_name app.py \ No newline at end of file From b23c4a92c2a566d2be0c412d2539c5288be0b239 Mon Sep 17 00:00:00 2001 From: aakrem Date: Mon, 6 May 2024 22:11:58 +0200 Subject: [PATCH 08/10] add all in 1 step --- .github/workflows/agenta-cli-test.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index 29abe3689..3ce22dc7e 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -28,19 +28,13 @@ jobs: poetry config virtualenvs.in-project true - name: Install dependencies - run: | - cd agenta-cli - poetry install - - - name: Initialize Agenta env: BACKEND_HOST: ${{ secrets.BACKEND_HOST }} run: | + cd agenta-cli + poetry install pwd ls agenta - cd examples/baby_name_generator + cd ../examples/baby_name_generator poetry run agenta init --app_name woooo --backend_host $BACKEND_HOST - - - name: Serve Application - run: | poetry run agenta variant serve --file_name app.py \ No newline at end of file From 082258f68b5b5ab977d357d3651af558cad9e0f9 Mon Sep 17 00:00:00 2001 From: aakrem Date: Mon, 6 May 2024 22:14:12 +0200 Subject: [PATCH 09/10] ls --- .github/workflows/agenta-cli-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index 3ce22dc7e..3946c6af1 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -34,7 +34,7 @@ jobs: cd agenta-cli poetry install pwd - ls agenta cd ../examples/baby_name_generator + ls poetry run agenta init --app_name woooo --backend_host $BACKEND_HOST poetry run agenta variant serve --file_name app.py \ No newline at end of file From 10ee324fed5f5cfa6d9b86e369da248b500c78dc Mon Sep 17 00:00:00 2001 From: aakrem Date: Mon, 6 May 2024 22:24:46 +0200 Subject: [PATCH 10/10] run from agenta-cli --- .github/workflows/agenta-cli-test.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index 3946c6af1..fe3011317 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -27,14 +27,12 @@ jobs: run: | poetry config virtualenvs.in-project true - - name: Install dependencies + - name: Initialize Agenta env: BACKEND_HOST: ${{ secrets.BACKEND_HOST }} run: | - cd agenta-cli - poetry install - pwd - cd ../examples/baby_name_generator - ls - poetry run agenta init --app_name woooo --backend_host $BACKEND_HOST - poetry run agenta variant serve --file_name app.py \ No newline at end of file + poetry run python ../../agenta-cli/agenta init --app_name woooo --backend_host $BACKEND_HOST + + - name: Serve Application + run: | + poetry run python ../../agenta-cli/agenta variant serve --file_name app.py \ No newline at end of file