Workflow for cli commands #11
Workflow file for this run
This file contains 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
name: Agenta CLI Workflow | |
on: | |
pull_request: | |
# paths: | |
# - "agenta-backend/**" | |
# - "agenta-cli/**" | |
jobs: | |
run-agenta-cli: | |
runs-on: ubuntu-latest | |
environment: oss | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up python | |
id: setup-python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: | | |
venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}- | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: | | |
cd agenta-cli | |
poetry install --no-interaction --no-root | |
- name: Run agenta commands in different directory | |
env: | |
BACKEND_HOST: ${{ secrets.BACKEND_HOST }} | |
run: | | |
cd agenta-cli | |
poetry run agenta init --app_name woooo --backend_host ${{ secrets.BACKEND_HOST }} | |
poetry run agenta variant serve --file_name ../examples/baby_name_generator/app.py | |
poetry run agenta variant serve --file_name ../examples/baby_name_generator/app.py --overwrite | |
# - name: Create .env file | |
# run: | | |
# echo "OPEN_API_KEY=${{ secrets.OPEN_API_KEY }}" > .env | |
# working-directory: examples/baby_name_generator |