From 550a0096ad3def3c3670cd08ff50ded3f0b2af52 Mon Sep 17 00:00:00 2001 From: John Alling Date: Mon, 22 Jul 2024 10:24:12 -0400 Subject: [PATCH 01/20] split e2e.yaml into two workflows --- .github/workflows/e2e_tests_1.yaml | 139 ++++++++++++++++++ .../workflows/{e2e.yaml => e2e_tests_2.yaml} | 83 +++-------- 2 files changed, 163 insertions(+), 59 deletions(-) create mode 100644 .github/workflows/e2e_tests_1.yaml rename .github/workflows/{e2e.yaml => e2e_tests_2.yaml} (63%) diff --git a/.github/workflows/e2e_tests_1.yaml b/.github/workflows/e2e_tests_1.yaml new file mode 100644 index 000000000..223a9fbb4 --- /dev/null +++ b/.github/workflows/e2e_tests_1.yaml @@ -0,0 +1,139 @@ +name: e2e_tests_1 +on: + pull_request: + types: + - ready_for_review + - review_requested + - synchronize + - milestoned + paths: + # Catch-all + - "**" + + # Ignore updates to the .github directory, unless it's this current file + - "!.github/**" + - ".github/workflows/e2e_test_1.yaml" + + # Ignore docs and website things + - "!**.md" + - "!docs/**" + - "!adr/**" + - "!website/**" + - "!netlify.toml" + + # Ignore updates to generic github metadata files + - "!CODEOWNERS" + - "!.gitignore" + - "!LICENSE" + + # Ignore local development files + - "!.pre-commit-config.yaml" + + # Ignore non e2e tests + - "!tests/pytest/**" + + # Ignore LFAI-UI things (for now?) + - "!src/leapfrogai_ui/**" + - "!packages/ui/**" + + # Ignore changes to the repeater model + - "!packages/repeater/**" + + +concurrency: + group: e2e-${{ github.ref }} + cancel-in-progress: true + +jobs: + e2e: + runs-on: ai-ubuntu-big-boy-8-core + if: ${{ !github.event.pull_request.draft }} + + steps: + - name: Checkout Repo + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Setup Python + uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c #v5.0.0 + with: + python-version-file: 'pyproject.toml' + + - name: Install Python Deps + run: python -m pip install "." + + - name: Setup Node + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 + with: + node-version-file: 'src/leapfrogai_ui/package.json' + + - name: Install UI/Playwright Dependencies + run: | + npm --prefix src/leapfrogai_ui ci + npx --prefix src/leapfrogai_ui playwright install + + - name: Setup UDS Environment + uses: defenseunicorns/uds-common/.github/actions/setup@05f42bb3117b66ebef8c72ae050b34bce19385f5 + with: + username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }} + password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }} + + - name: Create UDS Cluster + run: | + uds deploy k3d-core-slim-dev:0.22.2 --confirm + + ########## + # Supabase + ########## + - name: Deploy Supabase + run: | + make build-supabase LOCAL_VERSION=e2e-test + docker image prune -af + uds zarf tools kubectl create namespace leapfrogai + uds zarf package deploy packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst --confirm + rm packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst + + - name: Set environment variable + id: set-env-var + run: | + echo "ANON_KEY=$(uds zarf tools kubectl get secret supabase-bootstrap-jwt -n leapfrogai -o jsonpath='{.data.anon-key}' | base64 -d)" >> "$GITHUB_ENV" + + - name: Test Supabase + run: | + python -m pip install requests + python -m pytest ./tests/e2e/test_supabase.py -v + + ########## + # UI + ########## + - name: Deploy LFAI-UI + run: | + make build-ui LOCAL_VERSION=e2e-test + docker image prune -af + uds zarf package deploy packages/ui/zarf-package-leapfrogai-ui-amd64-e2e-test.tar.zst --confirm + rm packages/ui/zarf-package-leapfrogai-ui-amd64-e2e-test.tar.zst + + ########## + # API + ########## + - name: Deploy LFAI-API + run: | + make build-api LOCAL_VERSION=e2e-test + docker image prune -af + uds zarf package deploy packages/api/zarf-package-leapfrogai-api-amd64-e2e-test.tar.zst --confirm + rm packages/api/zarf-package-leapfrogai-api-amd64-e2e-test.tar.zst + + - name: Test API + run: | + python -m pip install requests + python -m pytest ./tests/e2e/test_api.py -v + + # Run the playwright UI tests using the deployed Supabase endpoint + - name: UI/API/Supabase E2E Playwright Tests + run: | + cp src/leapfrogai_ui/.env.example src/leapfrogai_ui/.env + TEST_ENV=CI PUBLIC_DISABLE_KEYCLOAK=true PUBLIC_SUPABASE_ANON_KEY=$ANON_KEY npm --prefix src/leapfrogai_ui run test:integration:ci + + # The UI can be removed after the Playwright tests are finished + - name: Cleanup UI + run: | + uds zarf package remove leapfrogai-ui --confirm diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e_tests_2.yaml similarity index 63% rename from .github/workflows/e2e.yaml rename to .github/workflows/e2e_tests_2.yaml index 11ac50a61..687cad7a8 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e_tests_2.yaml @@ -1,4 +1,4 @@ -name: e2e +name: e2e_tests_2 on: pull_request: types: @@ -12,7 +12,7 @@ on: # Ignore updates to the .github directory, unless it's this current file - "!.github/**" - - ".github/workflows/e2e.yaml" + - ".github/workflows/e2e_tests_2.yaml" # Ignore docs and website things - "!**.md" @@ -57,16 +57,6 @@ jobs: - name: Install Python Deps run: python -m pip install "." - - name: Setup Node - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 - with: - node-version-file: 'src/leapfrogai_ui/package.json' - - - name: Install UI/Playwright Dependencies - run: | - npm --prefix src/leapfrogai_ui ci - npx --prefix src/leapfrogai_ui playwright install - - name: Setup UDS Environment uses: defenseunicorns/uds-common/.github/actions/setup@05f42bb3117b66ebef8c72ae050b34bce19385f5 with: @@ -77,36 +67,27 @@ jobs: run: | uds deploy k3d-core-slim-dev:0.23.0 --confirm - ########## - # Supabase - ########## - - name: Deploy Supabase - run: | - make build-supabase LOCAL_VERSION=e2e-test - docker image prune -af - uds zarf tools kubectl create namespace leapfrogai - uds zarf package deploy packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst --confirm - rm packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst + # ########## + # # Supabase + # ########## + # - name: Deploy Supabase + # run: | + # make build-supabase LOCAL_VERSION=e2e-test + # docker image prune -af + # uds zarf tools kubectl create namespace leapfrogai + # uds zarf package deploy packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst --confirm + # rm packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst - - name: Set environment variable - id: set-env-var - run: | - echo "ANON_KEY=$(uds zarf tools kubectl get secret supabase-bootstrap-jwt -n leapfrogai -o jsonpath='{.data.anon-key}' | base64 -d)" >> "$GITHUB_ENV" + # - name: Set environment variable + # id: set-env-var + # run: | + # echo "ANON_KEY=$(uds zarf tools kubectl get secret supabase-bootstrap-jwt -n leapfrogai -o jsonpath='{.data.anon-key}' | base64 -d)" >> "$GITHUB_ENV" - - name: Test Supabase - run: | - python -m pip install requests - python -m pytest ./tests/e2e/test_supabase.py -v + # - name: Test Supabase + # run: | + # python -m pip install requests + # python -m pytest ./tests/e2e/test_supabase.py -v - ########## - # UI - ########## - - name: Deploy LFAI-UI - run: | - make build-ui LOCAL_VERSION=e2e-test - docker image prune -af - uds zarf package deploy packages/ui/zarf-package-leapfrogai-ui-amd64-e2e-test.tar.zst --confirm - rm packages/ui/zarf-package-leapfrogai-ui-amd64-e2e-test.tar.zst ########## # API @@ -118,22 +99,6 @@ jobs: uds zarf package deploy packages/api/zarf-package-leapfrogai-api-amd64-e2e-test.tar.zst --confirm rm packages/api/zarf-package-leapfrogai-api-amd64-e2e-test.tar.zst - - name: Test API - run: | - python -m pip install requests - python -m pytest ./tests/e2e/test_api.py -v - - # Run the playwright UI tests using the deployed Supabase endpoint - - name: UI/API/Supabase E2E Playwright Tests - run: | - cp src/leapfrogai_ui/.env.example src/leapfrogai_ui/.env - TEST_ENV=CI PUBLIC_DISABLE_KEYCLOAK=true PUBLIC_SUPABASE_ANON_KEY=$ANON_KEY npm --prefix src/leapfrogai_ui run test:integration:ci - - # The UI can be removed after the Playwright tests are finished - - name: Cleanup UI - run: | - uds zarf package remove leapfrogai-ui --confirm - ########## # llama ########## @@ -188,10 +153,10 @@ jobs: run: | uds zarf package remove whisper -l=trace --confirm - # This cleanup may need to be moved/removed when other packages depend on Supabase - - name: Cleanup Supabase - run: | - uds zarf package remove supabase -l=trace --confirm + # # This cleanup may need to be moved/removed when other packages depend on Supabase + # - name: Cleanup Supabase + # run: | + # uds zarf package remove supabase -l=trace --confirm ########## # vLLM From bc9930c04a2edbf7d0049313eb29b90af42e190b Mon Sep 17 00:00:00 2001 From: John Alling Date: Mon, 22 Jul 2024 10:29:56 -0400 Subject: [PATCH 02/20] fix concurency --- .github/workflows/e2e_tests_1.yaml | 4 ++-- .github/workflows/e2e_tests_2.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e_tests_1.yaml b/.github/workflows/e2e_tests_1.yaml index 223a9fbb4..6aca148a6 100644 --- a/.github/workflows/e2e_tests_1.yaml +++ b/.github/workflows/e2e_tests_1.yaml @@ -41,11 +41,11 @@ on: concurrency: - group: e2e-${{ github.ref }} + group: e2e-1-${{ github.ref }} cancel-in-progress: true jobs: - e2e: + e2e_1: runs-on: ai-ubuntu-big-boy-8-core if: ${{ !github.event.pull_request.draft }} diff --git a/.github/workflows/e2e_tests_2.yaml b/.github/workflows/e2e_tests_2.yaml index 687cad7a8..54ccb2bdb 100644 --- a/.github/workflows/e2e_tests_2.yaml +++ b/.github/workflows/e2e_tests_2.yaml @@ -37,11 +37,11 @@ on: concurrency: - group: e2e-${{ github.ref }} + group: e2e-1-${{ github.ref }} cancel-in-progress: true jobs: - e2e: + e2e_2: runs-on: ai-ubuntu-big-boy-8-core if: ${{ !github.event.pull_request.draft }} From 68f86c8e0606351f3d7bb301d3f1d47bec89e485 Mon Sep 17 00:00:00 2001 From: John Alling Date: Mon, 22 Jul 2024 10:32:28 -0400 Subject: [PATCH 03/20] file rename --- .github/workflows/{e2e_tests_1.yaml => e2e-1.yaml} | 0 .github/workflows/{e2e_tests_2.yaml => e2e-2.yaml} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{e2e_tests_1.yaml => e2e-1.yaml} (100%) rename .github/workflows/{e2e_tests_2.yaml => e2e-2.yaml} (100%) diff --git a/.github/workflows/e2e_tests_1.yaml b/.github/workflows/e2e-1.yaml similarity index 100% rename from .github/workflows/e2e_tests_1.yaml rename to .github/workflows/e2e-1.yaml diff --git a/.github/workflows/e2e_tests_2.yaml b/.github/workflows/e2e-2.yaml similarity index 100% rename from .github/workflows/e2e_tests_2.yaml rename to .github/workflows/e2e-2.yaml From 00766c5621e7889b3dc1889817d8e4fb51f39c1c Mon Sep 17 00:00:00 2001 From: John Alling Date: Mon, 22 Jul 2024 10:36:29 -0400 Subject: [PATCH 04/20] fix concurrency group --- .github/workflows/e2e-1.yaml | 2 +- .github/workflows/e2e-2.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-1.yaml b/.github/workflows/e2e-1.yaml index 6aca148a6..2e040fb99 100644 --- a/.github/workflows/e2e-1.yaml +++ b/.github/workflows/e2e-1.yaml @@ -12,7 +12,7 @@ on: # Ignore updates to the .github directory, unless it's this current file - "!.github/**" - - ".github/workflows/e2e_test_1.yaml" + - ".github/workflows/e2e-1.yaml" # Ignore docs and website things - "!**.md" diff --git a/.github/workflows/e2e-2.yaml b/.github/workflows/e2e-2.yaml index 54ccb2bdb..e915feefe 100644 --- a/.github/workflows/e2e-2.yaml +++ b/.github/workflows/e2e-2.yaml @@ -12,7 +12,7 @@ on: # Ignore updates to the .github directory, unless it's this current file - "!.github/**" - - ".github/workflows/e2e_tests_2.yaml" + - ".github/workflows/e2e-2.yaml" # Ignore docs and website things - "!**.md" @@ -37,7 +37,7 @@ on: concurrency: - group: e2e-1-${{ github.ref }} + group: e2e-2-${{ github.ref }} cancel-in-progress: true jobs: From 455eb4995ab9234c8d5f27b0797632d3c2d790a3 Mon Sep 17 00:00:00 2001 From: John Alling Date: Mon, 22 Jul 2024 10:55:32 -0400 Subject: [PATCH 05/20] move tests from one workflow to the other --- .github/workflows/e2e-1.yaml | 11 +++++++- .github/workflows/e2e-2.yaml | 51 +++++++++++++----------------------- 2 files changed, 28 insertions(+), 34 deletions(-) diff --git a/.github/workflows/e2e-1.yaml b/.github/workflows/e2e-1.yaml index 2e040fb99..9b2b34854 100644 --- a/.github/workflows/e2e-1.yaml +++ b/.github/workflows/e2e-1.yaml @@ -1,4 +1,4 @@ -name: e2e_tests_1 +name: e2e-1 on: pull_request: types: @@ -137,3 +137,12 @@ jobs: - name: Cleanup UI run: | uds zarf package remove leapfrogai-ui --confirm + + ########## + # vLLM + # NOTE: We are not deploying and testing vLLM in this workflow because it requires a GPU + # : This workflow simply verifies that the vLLM package can be built + ########## + - name: Build vLLM + run: | + make build-vllm LOCAL_VERSION=e2e-test diff --git a/.github/workflows/e2e-2.yaml b/.github/workflows/e2e-2.yaml index e915feefe..25e76642f 100644 --- a/.github/workflows/e2e-2.yaml +++ b/.github/workflows/e2e-2.yaml @@ -1,4 +1,4 @@ -name: e2e_tests_2 +name: e2e-2 on: pull_request: types: @@ -67,27 +67,21 @@ jobs: run: | uds deploy k3d-core-slim-dev:0.23.0 --confirm - # ########## - # # Supabase - # ########## - # - name: Deploy Supabase - # run: | - # make build-supabase LOCAL_VERSION=e2e-test - # docker image prune -af - # uds zarf tools kubectl create namespace leapfrogai - # uds zarf package deploy packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst --confirm - # rm packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst - - # - name: Set environment variable - # id: set-env-var - # run: | - # echo "ANON_KEY=$(uds zarf tools kubectl get secret supabase-bootstrap-jwt -n leapfrogai -o jsonpath='{.data.anon-key}' | base64 -d)" >> "$GITHUB_ENV" - - # - name: Test Supabase - # run: | - # python -m pip install requests - # python -m pytest ./tests/e2e/test_supabase.py -v + ########## + # Supabase + ########## + - name: Deploy Supabase + run: | + make build-supabase LOCAL_VERSION=e2e-test + docker image prune -af + uds zarf tools kubectl create namespace leapfrogai + uds zarf package deploy packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst --confirm + rm packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst + - name: Set environment variable + id: set-env-var + run: | + echo "ANON_KEY=$(uds zarf tools kubectl get secret supabase-bootstrap-jwt -n leapfrogai -o jsonpath='{.data.anon-key}' | base64 -d)" >> "$GITHUB_ENV" ########## # API @@ -153,16 +147,7 @@ jobs: run: | uds zarf package remove whisper -l=trace --confirm - # # This cleanup may need to be moved/removed when other packages depend on Supabase - # - name: Cleanup Supabase - # run: | - # uds zarf package remove supabase -l=trace --confirm - - ########## - # vLLM - # NOTE: We are not deploying and testing vLLM in this workflow because it requires a GPU - # : This workflow simply verifies that the vLLM package can be built - ########## - - name: Build vLLM + # This cleanup may need to be moved/removed when other packages depend on Supabase + - name: Cleanup Supabase run: | - make build-vllm LOCAL_VERSION=e2e-test + uds zarf package remove supabase -l=trace --confirm From ba243c1e1d96e46d990f887968e0826114dc05cd Mon Sep 17 00:00:00 2001 From: John Alling Date: Mon, 22 Jul 2024 11:27:11 -0400 Subject: [PATCH 06/20] add requests to python dependencies --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f86babfda..7631308c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,8 @@ dependencies = [ # Dev dependencies needed for all of lfai "httpx", "ruff", "python-dotenv", - "pytest-asyncio" + "pytest-asyncio", + "requests" ] requires-python = "~=3.11" From d5cbe5caeedf4d741f36d575626fd92905166874 Mon Sep 17 00:00:00 2001 From: John Alling Date: Mon, 22 Jul 2024 11:28:23 -0400 Subject: [PATCH 07/20] replace requests with inline call --- .github/workflows/e2e-2.yaml | 1 + pyproject.toml | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-2.yaml b/.github/workflows/e2e-2.yaml index 25e76642f..f494cd947 100644 --- a/.github/workflows/e2e-2.yaml +++ b/.github/workflows/e2e-2.yaml @@ -105,6 +105,7 @@ jobs: - name: Test llama-cpp-python run: | + python -m pip install requests python -m pytest ./tests/e2e/test_llama.py -v - name: Cleanup llama-cpp-python diff --git a/pyproject.toml b/pyproject.toml index 7631308c8..10314b04c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,6 @@ dependencies = [ # Dev dependencies needed for all of lfai "ruff", "python-dotenv", "pytest-asyncio", - "requests" ] requires-python = "~=3.11" From 001058cff606366510add615128715688895dba5 Mon Sep 17 00:00:00 2001 From: John Alling Date: Mon, 22 Jul 2024 13:28:38 -0400 Subject: [PATCH 08/20] add description --- .github/workflows/e2e-1.yaml | 1 + .github/workflows/e2e-2.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/e2e-1.yaml b/.github/workflows/e2e-1.yaml index 9b2b34854..9d9a8ed7c 100644 --- a/.github/workflows/e2e-1.yaml +++ b/.github/workflows/e2e-1.yaml @@ -1,4 +1,5 @@ name: e2e-1 +description: End-to-end testing that deploys and tests Supabase, API, UI, and VLLM on: pull_request: types: diff --git a/.github/workflows/e2e-2.yaml b/.github/workflows/e2e-2.yaml index f494cd947..2f397e525 100644 --- a/.github/workflows/e2e-2.yaml +++ b/.github/workflows/e2e-2.yaml @@ -1,4 +1,5 @@ name: e2e-2 +description: End-to-end testing that deploys Supabase and the API, and deploy/tests llama-cpp-python, text-embeddings, and whisper on: pull_request: types: From 6fd4f34aebe26faeafbf641fe61da7e8d1c77b53 Mon Sep 17 00:00:00 2001 From: John Alling Date: Mon, 22 Jul 2024 13:36:27 -0400 Subject: [PATCH 09/20] remove description and add comment --- .github/workflows/e2e-1.yaml | 3 ++- .github/workflows/e2e-2.yaml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-1.yaml b/.github/workflows/e2e-1.yaml index 9d9a8ed7c..64da42bbd 100644 --- a/.github/workflows/e2e-1.yaml +++ b/.github/workflows/e2e-1.yaml @@ -1,5 +1,6 @@ +# End-to-end testing that deploys and tests Supabase, API, UI, and VLLM + name: e2e-1 -description: End-to-end testing that deploys and tests Supabase, API, UI, and VLLM on: pull_request: types: diff --git a/.github/workflows/e2e-2.yaml b/.github/workflows/e2e-2.yaml index 2f397e525..a103ca3f7 100644 --- a/.github/workflows/e2e-2.yaml +++ b/.github/workflows/e2e-2.yaml @@ -1,5 +1,6 @@ +# End-to-end testing that deploys Supabase and the API, and deploy/tests llama-cpp-python, text-embeddings, and whisper + name: e2e-2 -description: End-to-end testing that deploys Supabase and the API, and deploy/tests llama-cpp-python, text-embeddings, and whisper on: pull_request: types: From 59c510db0ea541c7eeee8e6fc21ee5b889963101 Mon Sep 17 00:00:00 2001 From: John Alling <44934218+jalling97@users.noreply.github.com> Date: Mon, 22 Jul 2024 13:45:55 -0400 Subject: [PATCH 10/20] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 10314b04c..f86babfda 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ dependencies = [ # Dev dependencies needed for all of lfai "httpx", "ruff", "python-dotenv", - "pytest-asyncio", + "pytest-asyncio" ] requires-python = "~=3.11" From abb4d35f03c31857895b1b66c373d98d853cd900 Mon Sep 17 00:00:00 2001 From: Jon Perry Date: Thu, 25 Jul 2024 15:04:37 -0400 Subject: [PATCH 11/20] chore: split out e2e workflows by GenAI Model --- .github/workflows/e2e-llama.yaml | 115 ++++++++++++++++++ .../{e2e-1.yaml => e2e-playright.yaml} | 11 +- .../{e2e-2.yaml => e2e-text-embeddings.yaml} | 42 ------- .github/workflows/e2e-vllm.yaml | 79 ++++++++++++ .github/workflows/e2e-whisper.yaml | 114 +++++++++++++++++ 5 files changed, 309 insertions(+), 52 deletions(-) create mode 100644 .github/workflows/e2e-llama.yaml rename .github/workflows/{e2e-1.yaml => e2e-playright.yaml} (93%) rename .github/workflows/{e2e-2.yaml => e2e-text-embeddings.yaml} (70%) create mode 100644 .github/workflows/e2e-vllm.yaml create mode 100644 .github/workflows/e2e-whisper.yaml diff --git a/.github/workflows/e2e-llama.yaml b/.github/workflows/e2e-llama.yaml new file mode 100644 index 000000000..4a3323c88 --- /dev/null +++ b/.github/workflows/e2e-llama.yaml @@ -0,0 +1,115 @@ +# End-to-end testing that deploys Supabase and the API, and deploy/tests llama-cpp-python, text-embeddings, and whisper + +name: e2e-2 +on: + pull_request: + types: + - ready_for_review + - review_requested + - synchronize + - milestoned + paths: + # Catch-all + - "**" + + # Ignore updates to the .github directory, unless it's this current file + - "!.github/**" + - ".github/workflows/e2e-2.yaml" + + # Ignore docs and website things + - "!**.md" + - "!docs/**" + - "!adr/**" + - "!website/**" + - "!netlify.toml" + + # Ignore updates to generic github metadata files + - "!CODEOWNERS" + - "!.gitignore" + - "!LICENSE" + + # Ignore local development files + - "!.pre-commit-config.yaml" + + # Ignore non e2e tests + - "!tests/pytest/**" + + # Ignore LFAI-UI things (for now?) + - "!src/leapfrogai_ui/**" + - "!packages/ui/**" + + # Ignore changes to the repeater model + - "!packages/repeater/**" + + +concurrency: + group: e2e-2-${{ github.ref }} + cancel-in-progress: true + +jobs: + e2e_2: + runs-on: ai-ubuntu-big-boy-8-core + if: ${{ !github.event.pull_request.draft }} + + steps: + - name: Checkout Repo + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Setup Python + uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c #v5.0.0 + with: + python-version-file: 'pyproject.toml' + + - name: Install Python Deps + run: python -m pip install "." + + - name: Setup UDS Environment + uses: defenseunicorns/uds-common/.github/actions/setup@05f42bb3117b66ebef8c72ae050b34bce19385f5 + with: + username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }} + password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }} + + - name: Create UDS Cluster + run: | + uds deploy k3d-core-slim-dev:0.22.2 --confirm + + ########## + # Supabase + ########## + - name: Deploy Supabase + run: | + make build-supabase LOCAL_VERSION=e2e-test + docker image prune -af + uds zarf tools kubectl create namespace leapfrogai + uds zarf package deploy packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst --confirm + rm packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst + + - name: Set environment variable + id: set-env-var + run: | + echo "ANON_KEY=$(uds zarf tools kubectl get secret supabase-bootstrap-jwt -n leapfrogai -o jsonpath='{.data.anon-key}' | base64 -d)" >> "$GITHUB_ENV" + + ########## + # API + ########## + - name: Deploy LFAI-API + run: | + make build-api LOCAL_VERSION=e2e-test + docker image prune -af + uds zarf package deploy packages/api/zarf-package-leapfrogai-api-amd64-e2e-test.tar.zst --confirm + rm packages/api/zarf-package-leapfrogai-api-amd64-e2e-test.tar.zst + + ########## + # llama + ########## + - name: Deploy llama-cpp-python + run: | + make build-llama-cpp-python LOCAL_VERSION=e2e-test + docker image prune -af + uds zarf package deploy packages/llama-cpp-python/zarf-package-llama-cpp-python-amd64-e2e-test.tar.zst -l=trace --confirm + rm packages/llama-cpp-python/zarf-package-llama-cpp-python-amd64-e2e-test.tar.zst + + - name: Test llama-cpp-python + run: | + python -m pip install requests + python -m pytest ./tests/e2e/test_llama.py -v diff --git a/.github/workflows/e2e-1.yaml b/.github/workflows/e2e-playright.yaml similarity index 93% rename from .github/workflows/e2e-1.yaml rename to .github/workflows/e2e-playright.yaml index 64da42bbd..2eb57d40e 100644 --- a/.github/workflows/e2e-1.yaml +++ b/.github/workflows/e2e-playright.yaml @@ -1,6 +1,6 @@ # End-to-end testing that deploys and tests Supabase, API, UI, and VLLM -name: e2e-1 +name: e2e-playright on: pull_request: types: @@ -139,12 +139,3 @@ jobs: - name: Cleanup UI run: | uds zarf package remove leapfrogai-ui --confirm - - ########## - # vLLM - # NOTE: We are not deploying and testing vLLM in this workflow because it requires a GPU - # : This workflow simply verifies that the vLLM package can be built - ########## - - name: Build vLLM - run: | - make build-vllm LOCAL_VERSION=e2e-test diff --git a/.github/workflows/e2e-2.yaml b/.github/workflows/e2e-text-embeddings.yaml similarity index 70% rename from .github/workflows/e2e-2.yaml rename to .github/workflows/e2e-text-embeddings.yaml index a103ca3f7..69bee5963 100644 --- a/.github/workflows/e2e-2.yaml +++ b/.github/workflows/e2e-text-embeddings.yaml @@ -95,25 +95,6 @@ jobs: uds zarf package deploy packages/api/zarf-package-leapfrogai-api-amd64-e2e-test.tar.zst --confirm rm packages/api/zarf-package-leapfrogai-api-amd64-e2e-test.tar.zst - ########## - # llama - ########## - - name: Deploy llama-cpp-python - run: | - make build-llama-cpp-python LOCAL_VERSION=e2e-test - docker image prune -af - uds zarf package deploy packages/llama-cpp-python/zarf-package-llama-cpp-python-amd64-e2e-test.tar.zst -l=trace --confirm - rm packages/llama-cpp-python/zarf-package-llama-cpp-python-amd64-e2e-test.tar.zst - - - name: Test llama-cpp-python - run: | - python -m pip install requests - python -m pytest ./tests/e2e/test_llama.py -v - - - name: Cleanup llama-cpp-python - run: | - uds zarf package remove llama-cpp-python -l=trace --confirm - ########## # text-embeddings ########## @@ -131,26 +112,3 @@ jobs: - name: Cleanup text-embeddings run: | uds zarf package remove text-embeddings -l=trace --confirm - - ########## - # whisper - ########## - - name: Deploy whisper - run: | - make build-whisper LOCAL_VERSION=e2e-test - docker image prune -af - uds zarf package deploy packages/whisper/zarf-package-whisper-amd64-e2e-test.tar.zst -l=trace --confirm - rm packages/whisper/zarf-package-whisper-amd64-e2e-test.tar.zst - - - name: Test whisper - run: | - python -m pytest ./tests/e2e/test_whisper.py -v - - - name: Cleanup whisper - run: | - uds zarf package remove whisper -l=trace --confirm - - # This cleanup may need to be moved/removed when other packages depend on Supabase - - name: Cleanup Supabase - run: | - uds zarf package remove supabase -l=trace --confirm diff --git a/.github/workflows/e2e-vllm.yaml b/.github/workflows/e2e-vllm.yaml new file mode 100644 index 000000000..a72b6dc05 --- /dev/null +++ b/.github/workflows/e2e-vllm.yaml @@ -0,0 +1,79 @@ +# End-to-end testing that deploys and tests Supabase, API, UI, and VLLM + +name: e2e-vllm +on: + pull_request: + types: + - ready_for_review + - review_requested + - synchronize + - milestoned + paths: + # Catch-all + - "**" + + # Ignore updates to the .github directory, unless it's this current file + - "!.github/**" + - ".github/workflows/e2e-1.yaml" + + # Ignore docs and website things + - "!**.md" + - "!docs/**" + - "!adr/**" + - "!website/**" + - "!netlify.toml" + + # Ignore updates to generic github metadata files + - "!CODEOWNERS" + - "!.gitignore" + - "!LICENSE" + + # Ignore local development files + - "!.pre-commit-config.yaml" + + # Ignore non e2e tests + - "!tests/pytest/**" + + # Ignore LFAI-UI things (for now?) + - "!src/leapfrogai_ui/**" + - "!packages/ui/**" + + # Ignore changes to the repeater model + - "!packages/repeater/**" + + +concurrency: + group: e2e-1-${{ github.ref }} + cancel-in-progress: true + +jobs: + e2e_1: + runs-on: ai-ubuntu-big-boy-8-core + if: ${{ !github.event.pull_request.draft }} + + steps: + - name: Checkout Repo + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Setup Python + uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c #v5.0.0 + with: + python-version-file: 'pyproject.toml' + + - name: Install Python Deps + run: python -m pip install "." + + - name: Setup UDS Environment + uses: defenseunicorns/uds-common/.github/actions/setup@05f42bb3117b66ebef8c72ae050b34bce19385f5 + with: + username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }} + password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }} + + ########## c + # vLLM + # NOTE: We are not deploying and testing vLLM in this workflow because it requires a GPU + # : This workflow simply verifies that the vLLM package can be built + ########## + - name: Build vLLM + run: | + make build-vllm LOCAL_VERSION=e2e-test diff --git a/.github/workflows/e2e-whisper.yaml b/.github/workflows/e2e-whisper.yaml new file mode 100644 index 000000000..68ec5c31c --- /dev/null +++ b/.github/workflows/e2e-whisper.yaml @@ -0,0 +1,114 @@ +# End-to-end testing that deploys Supabase and the API, and deploy/tests llama-cpp-python, text-embeddings, and whisper + +name: e2e-2 +on: + pull_request: + types: + - ready_for_review + - review_requested + - synchronize + - milestoned + paths: + # Catch-all + - "**" + + # Ignore updates to the .github directory, unless it's this current file + - "!.github/**" + - ".github/workflows/e2e-2.yaml" + + # Ignore docs and website things + - "!**.md" + - "!docs/**" + - "!adr/**" + - "!website/**" + - "!netlify.toml" + + # Ignore updates to generic github metadata files + - "!CODEOWNERS" + - "!.gitignore" + - "!LICENSE" + + # Ignore local development files + - "!.pre-commit-config.yaml" + + # Ignore non e2e tests + - "!tests/pytest/**" + + # Ignore LFAI-UI things (for now?) + - "!src/leapfrogai_ui/**" + - "!packages/ui/**" + + # Ignore changes to the repeater model + - "!packages/repeater/**" + + +concurrency: + group: e2e-2-${{ github.ref }} + cancel-in-progress: true + +jobs: + e2e_2: + runs-on: ai-ubuntu-big-boy-8-core + if: ${{ !github.event.pull_request.draft }} + + steps: + - name: Checkout Repo + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Setup Python + uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c #v5.0.0 + with: + python-version-file: 'pyproject.toml' + + - name: Install Python Deps + run: python -m pip install "." + + - name: Setup UDS Environment + uses: defenseunicorns/uds-common/.github/actions/setup@05f42bb3117b66ebef8c72ae050b34bce19385f5 + with: + username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }} + password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }} + + - name: Create UDS Cluster + run: | + uds deploy k3d-core-slim-dev:0.22.2 --confirm + + ########## + # Supabase + ########## + - name: Deploy Supabase + run: | + make build-supabase LOCAL_VERSION=e2e-test + docker image prune -af + uds zarf tools kubectl create namespace leapfrogai + uds zarf package deploy packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst --confirm + rm packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst + + - name: Set environment variable + id: set-env-var + run: | + echo "ANON_KEY=$(uds zarf tools kubectl get secret supabase-bootstrap-jwt -n leapfrogai -o jsonpath='{.data.anon-key}' | base64 -d)" >> "$GITHUB_ENV" + + ########## + # API + ########## + - name: Deploy LFAI-API + run: | + make build-api LOCAL_VERSION=e2e-test + docker image prune -af + uds zarf package deploy packages/api/zarf-package-leapfrogai-api-amd64-e2e-test.tar.zst --confirm + rm packages/api/zarf-package-leapfrogai-api-amd64-e2e-test.tar.zst + + ########## + # whisper + ########## + - name: Deploy whisper + run: | + make build-whisper LOCAL_VERSION=e2e-test + docker image prune -af + uds zarf package deploy packages/whisper/zarf-package-whisper-amd64-e2e-test.tar.zst -l=trace --confirm + rm packages/whisper/zarf-package-whisper-amd64-e2e-test.tar.zst + + - name: Test whisper + run: | + python -m pytest ./tests/e2e/test_whisper.py -v From 859d9c67faf03b437372d08c4000c995681bce88 Mon Sep 17 00:00:00 2001 From: Jon Perry Date: Thu, 25 Jul 2024 15:09:31 -0400 Subject: [PATCH 12/20] chore: deconflict e2e workflow names --- .github/workflows/e2e-llama.yaml | 2 +- .github/workflows/e2e-text-embeddings.yaml | 2 +- .github/workflows/e2e-whisper.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-llama.yaml b/.github/workflows/e2e-llama.yaml index 4a3323c88..c484fde4a 100644 --- a/.github/workflows/e2e-llama.yaml +++ b/.github/workflows/e2e-llama.yaml @@ -1,6 +1,6 @@ # End-to-end testing that deploys Supabase and the API, and deploy/tests llama-cpp-python, text-embeddings, and whisper -name: e2e-2 +name: e2e-llama on: pull_request: types: diff --git a/.github/workflows/e2e-text-embeddings.yaml b/.github/workflows/e2e-text-embeddings.yaml index 69bee5963..fd0467488 100644 --- a/.github/workflows/e2e-text-embeddings.yaml +++ b/.github/workflows/e2e-text-embeddings.yaml @@ -1,6 +1,6 @@ # End-to-end testing that deploys Supabase and the API, and deploy/tests llama-cpp-python, text-embeddings, and whisper -name: e2e-2 +name: e2e-text-embeddings on: pull_request: types: diff --git a/.github/workflows/e2e-whisper.yaml b/.github/workflows/e2e-whisper.yaml index 68ec5c31c..9f27d6dd0 100644 --- a/.github/workflows/e2e-whisper.yaml +++ b/.github/workflows/e2e-whisper.yaml @@ -1,6 +1,6 @@ # End-to-end testing that deploys Supabase and the API, and deploy/tests llama-cpp-python, text-embeddings, and whisper -name: e2e-2 +name: e2e-whisper on: pull_request: types: From befc4431f26dfb3e8337ffa6856c2037b64fe5df Mon Sep 17 00:00:00 2001 From: Jon Perry Date: Thu, 25 Jul 2024 15:15:28 -0400 Subject: [PATCH 13/20] chore: deconflict e2e workflow concurrency-group names --- .github/workflows/e2e-llama.yaml | 52 +++++++++++----------- .github/workflows/e2e-playright.yaml | 2 +- .github/workflows/e2e-text-embeddings.yaml | 2 +- .github/workflows/e2e-vllm.yaml | 2 +- .github/workflows/e2e-whisper.yaml | 2 +- 5 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/e2e-llama.yaml b/.github/workflows/e2e-llama.yaml index c484fde4a..f751ddcba 100644 --- a/.github/workflows/e2e-llama.yaml +++ b/.github/workflows/e2e-llama.yaml @@ -8,42 +8,42 @@ on: - review_requested - synchronize - milestoned - paths: - # Catch-all - - "**" + # paths: + # # Catch-all + # - "**" - # Ignore updates to the .github directory, unless it's this current file - - "!.github/**" - - ".github/workflows/e2e-2.yaml" + # # Ignore updates to the .github directory, unless it's this current file + # - "!.github/**" + # - ".github/workflows/e2e-2.yaml" - # Ignore docs and website things - - "!**.md" - - "!docs/**" - - "!adr/**" - - "!website/**" - - "!netlify.toml" + # # Ignore docs and website things + # - "!**.md" + # - "!docs/**" + # - "!adr/**" + # - "!website/**" + # - "!netlify.toml" - # Ignore updates to generic github metadata files - - "!CODEOWNERS" - - "!.gitignore" - - "!LICENSE" + # # Ignore updates to generic github metadata files + # - "!CODEOWNERS" + # - "!.gitignore" + # - "!LICENSE" - # Ignore local development files - - "!.pre-commit-config.yaml" + # # Ignore local development files + # - "!.pre-commit-config.yaml" - # Ignore non e2e tests - - "!tests/pytest/**" + # # Ignore non e2e tests + # - "!tests/pytest/**" - # Ignore LFAI-UI things (for now?) - - "!src/leapfrogai_ui/**" - - "!packages/ui/**" + # # Ignore LFAI-UI things (for now?) + # - "!src/leapfrogai_ui/**" + # - "!packages/ui/**" - # Ignore changes to the repeater model - - "!packages/repeater/**" + # # Ignore changes to the repeater model + # - "!packages/repeater/**" concurrency: - group: e2e-2-${{ github.ref }} + group: e2e-llama-${{ github.ref }} cancel-in-progress: true jobs: diff --git a/.github/workflows/e2e-playright.yaml b/.github/workflows/e2e-playright.yaml index 2eb57d40e..3b5974fbe 100644 --- a/.github/workflows/e2e-playright.yaml +++ b/.github/workflows/e2e-playright.yaml @@ -43,7 +43,7 @@ on: concurrency: - group: e2e-1-${{ github.ref }} + group: e2e-playright-${{ github.ref }} cancel-in-progress: true jobs: diff --git a/.github/workflows/e2e-text-embeddings.yaml b/.github/workflows/e2e-text-embeddings.yaml index fd0467488..62fec320e 100644 --- a/.github/workflows/e2e-text-embeddings.yaml +++ b/.github/workflows/e2e-text-embeddings.yaml @@ -39,7 +39,7 @@ on: concurrency: - group: e2e-2-${{ github.ref }} + group: e2e-text-embeddings-${{ github.ref }} cancel-in-progress: true jobs: diff --git a/.github/workflows/e2e-vllm.yaml b/.github/workflows/e2e-vllm.yaml index a72b6dc05..c6df4f9fe 100644 --- a/.github/workflows/e2e-vllm.yaml +++ b/.github/workflows/e2e-vllm.yaml @@ -43,7 +43,7 @@ on: concurrency: - group: e2e-1-${{ github.ref }} + group: e2e-vllm-${{ github.ref }} cancel-in-progress: true jobs: diff --git a/.github/workflows/e2e-whisper.yaml b/.github/workflows/e2e-whisper.yaml index 9f27d6dd0..267eb7306 100644 --- a/.github/workflows/e2e-whisper.yaml +++ b/.github/workflows/e2e-whisper.yaml @@ -43,7 +43,7 @@ on: concurrency: - group: e2e-2-${{ github.ref }} + group: e2e-whisper-${{ github.ref }} cancel-in-progress: true jobs: From 8328dcfb55415ac0e51ffb9741b0d2cb18651455 Mon Sep 17 00:00:00 2001 From: Jon Perry Date: Thu, 25 Jul 2024 15:38:36 -0400 Subject: [PATCH 14/20] chore: update e2e workflow path triggers --- ...e-llama.yaml => e2e-llama-cpp-python.yaml} | 73 ++++++++++--------- .github/workflows/e2e-playright.yaml | 16 ++-- .github/workflows/e2e-text-embeddings.yaml | 15 +++- .github/workflows/e2e-vllm.yaml | 15 ++-- .github/workflows/e2e-whisper.yaml | 15 ++-- 5 files changed, 78 insertions(+), 56 deletions(-) rename .github/workflows/{e2e-llama.yaml => e2e-llama-cpp-python.yaml} (74%) diff --git a/.github/workflows/e2e-llama.yaml b/.github/workflows/e2e-llama-cpp-python.yaml similarity index 74% rename from .github/workflows/e2e-llama.yaml rename to .github/workflows/e2e-llama-cpp-python.yaml index f751ddcba..7d2a582ca 100644 --- a/.github/workflows/e2e-llama.yaml +++ b/.github/workflows/e2e-llama-cpp-python.yaml @@ -1,6 +1,6 @@ # End-to-end testing that deploys Supabase and the API, and deploy/tests llama-cpp-python, text-embeddings, and whisper -name: e2e-llama +name: e2e-llama-cpp-python on: pull_request: types: @@ -8,42 +8,45 @@ on: - review_requested - synchronize - milestoned - # paths: - # # Catch-all - # - "**" - - # # Ignore updates to the .github directory, unless it's this current file - # - "!.github/**" - # - ".github/workflows/e2e-2.yaml" - - # # Ignore docs and website things - # - "!**.md" - # - "!docs/**" - # - "!adr/**" - # - "!website/**" - # - "!netlify.toml" - - # # Ignore updates to generic github metadata files - # - "!CODEOWNERS" - # - "!.gitignore" - # - "!LICENSE" - - # # Ignore local development files - # - "!.pre-commit-config.yaml" - - # # Ignore non e2e tests - # - "!tests/pytest/**" - - # # Ignore LFAI-UI things (for now?) - # - "!src/leapfrogai_ui/**" - # - "!packages/ui/**" - - # # Ignore changes to the repeater model - # - "!packages/repeater/**" - + paths: + # Catch-all + - "**" + + # Ignore updates to the .github directory, unless it's this current file + - "!.github/**" + - ".github/workflows/e2e-llama-cpp-python.yaml" + + # Ignore docs and website things + - "!**.md" + - "!docs/**" + - "!adr/**" + - "!website/**" + - "!netlify.toml" + + # Ignore updates to generic github metadata files + - "!CODEOWNERS" + - "!.gitignore" + - "!LICENSE" + + # Ignore local development files + - "!.pre-commit-config.yaml" + + # Ignore non e2e tests changes + - "!tests/pytest/**" + + # Ignore LFAI-UI source code changes + - "!src/leapfrogai_ui/**" + + # Ignore changes to unrelated packages + - "!packages/k3d-gpu/**" + - "!packages/repeater/**" + - "!packages/text-embeddings/**" + - "!packages/ui/**" + - "!packages/vllm/**" + - "!packages/whisper/**" concurrency: - group: e2e-llama-${{ github.ref }} + group: e2e-llama-cpp-python-${{ github.ref }} cancel-in-progress: true jobs: diff --git a/.github/workflows/e2e-playright.yaml b/.github/workflows/e2e-playright.yaml index 3b5974fbe..4f334e2f2 100644 --- a/.github/workflows/e2e-playright.yaml +++ b/.github/workflows/e2e-playright.yaml @@ -14,7 +14,7 @@ on: # Ignore updates to the .github directory, unless it's this current file - "!.github/**" - - ".github/workflows/e2e-1.yaml" + - ".github/workflows/e2e-playright.yaml" # Ignore docs and website things - "!**.md" @@ -31,15 +31,17 @@ on: # Ignore local development files - "!.pre-commit-config.yaml" - # Ignore non e2e tests + # Ignore non e2e tests changes - "!tests/pytest/**" - # Ignore LFAI-UI things (for now?) - - "!src/leapfrogai_ui/**" - - "!packages/ui/**" - - # Ignore changes to the repeater model + # Ignore changes to unrelated packages + - "!packages/k3d-gpu/**" + - "!packages/llama-cpp-python/**" - "!packages/repeater/**" + - "!packages/text-embeddings/**" + - "!packages/vllm/**" + - "!packages/whisper/**" + concurrency: diff --git a/.github/workflows/e2e-text-embeddings.yaml b/.github/workflows/e2e-text-embeddings.yaml index 62fec320e..263a60479 100644 --- a/.github/workflows/e2e-text-embeddings.yaml +++ b/.github/workflows/e2e-text-embeddings.yaml @@ -14,7 +14,7 @@ on: # Ignore updates to the .github directory, unless it's this current file - "!.github/**" - - ".github/workflows/e2e-2.yaml" + - ".github/workflows/e2e-text-embeddings.yaml" # Ignore docs and website things - "!**.md" @@ -31,11 +31,20 @@ on: # Ignore local development files - "!.pre-commit-config.yaml" - # Ignore non e2e tests + # Ignore non e2e tests changes - "!tests/pytest/**" - # Ignore changes to the repeater model + # Ignore LFAI-UI source code changes + - "!src/leapfrogai_ui/**" + + # Ignore changes to unrelated packages + - "!packages/k3d-gpu/**" + - "!packages/llama-cpp-python/**" - "!packages/repeater/**" + - "!packages/ui/**" + - "!packages/vllm/**" + - "!packages/whisper/**" + concurrency: diff --git a/.github/workflows/e2e-vllm.yaml b/.github/workflows/e2e-vllm.yaml index c6df4f9fe..100f87e36 100644 --- a/.github/workflows/e2e-vllm.yaml +++ b/.github/workflows/e2e-vllm.yaml @@ -14,7 +14,7 @@ on: # Ignore updates to the .github directory, unless it's this current file - "!.github/**" - - ".github/workflows/e2e-1.yaml" + - ".github/workflows/e2e-vllm.yaml" # Ignore docs and website things - "!**.md" @@ -31,15 +31,20 @@ on: # Ignore local development files - "!.pre-commit-config.yaml" - # Ignore non e2e tests + # Ignore non e2e tests changes - "!tests/pytest/**" - # Ignore LFAI-UI things (for now?) + # Ignore LFAI-UI source code changes - "!src/leapfrogai_ui/**" - - "!packages/ui/**" - # Ignore changes to the repeater model + # Ignore changes to unrelated packages + - "!packages/k3d-gpu/**" + - "!packages/llama-cpp-python/**" - "!packages/repeater/**" + - "!packages/text-embeddings/**" + - "!packages/ui/**" + - "!packages/whisper/**" + concurrency: diff --git a/.github/workflows/e2e-whisper.yaml b/.github/workflows/e2e-whisper.yaml index 267eb7306..0220d0c05 100644 --- a/.github/workflows/e2e-whisper.yaml +++ b/.github/workflows/e2e-whisper.yaml @@ -14,7 +14,7 @@ on: # Ignore updates to the .github directory, unless it's this current file - "!.github/**" - - ".github/workflows/e2e-2.yaml" + - ".github/workflows/e2e-whisper.yaml" # Ignore docs and website things - "!**.md" @@ -31,16 +31,19 @@ on: # Ignore local development files - "!.pre-commit-config.yaml" - # Ignore non e2e tests + # Ignore non e2e tests changes - "!tests/pytest/**" - # Ignore LFAI-UI things (for now?) + # Ignore LFAI-UI source code changes - "!src/leapfrogai_ui/**" - - "!packages/ui/**" - # Ignore changes to the repeater model + # Ignore changes to unrelated packages + - "!packages/k3d-gpu/**" + - "!packages/llama-cpp-python/**" - "!packages/repeater/**" - + - "!packages/text-embeddings/**" + - "!packages/ui/**" + - "!packages/vllm/**" concurrency: group: e2e-whisper-${{ github.ref }} From 0c287b13067655b01f7887e3adc3f822f4251c8f Mon Sep 17 00:00:00 2001 From: Jon Perry Date: Thu, 25 Jul 2024 16:40:32 -0400 Subject: [PATCH 15/20] fix: add 'requests' to pyproject dependencies --- .github/workflows/e2e-llama-cpp-python.yaml | 1 - pyproject.toml | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-llama-cpp-python.yaml b/.github/workflows/e2e-llama-cpp-python.yaml index 7d2a582ca..7393ac4a9 100644 --- a/.github/workflows/e2e-llama-cpp-python.yaml +++ b/.github/workflows/e2e-llama-cpp-python.yaml @@ -114,5 +114,4 @@ jobs: - name: Test llama-cpp-python run: | - python -m pip install requests python -m pytest ./tests/e2e/test_llama.py -v diff --git a/pyproject.toml b/pyproject.toml index f86babfda..7631308c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,8 @@ dependencies = [ # Dev dependencies needed for all of lfai "httpx", "ruff", "python-dotenv", - "pytest-asyncio" + "pytest-asyncio", + "requests" ] requires-python = "~=3.11" From 3732fbc377760bf45b4802a0eae6e163120196eb Mon Sep 17 00:00:00 2001 From: Jon Perry Date: Thu, 25 Jul 2024 16:55:30 -0400 Subject: [PATCH 16/20] chore: deconflict e2e workflow job names --- .github/workflows/e2e-llama-cpp-python.yaml | 2 +- .github/workflows/e2e-playright.yaml | 2 +- .github/workflows/e2e-text-embeddings.yaml | 2 +- .github/workflows/e2e-vllm.yaml | 2 +- .github/workflows/e2e-whisper.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e-llama-cpp-python.yaml b/.github/workflows/e2e-llama-cpp-python.yaml index 7393ac4a9..12f1e1fac 100644 --- a/.github/workflows/e2e-llama-cpp-python.yaml +++ b/.github/workflows/e2e-llama-cpp-python.yaml @@ -50,7 +50,7 @@ concurrency: cancel-in-progress: true jobs: - e2e_2: + e2e_llama: runs-on: ai-ubuntu-big-boy-8-core if: ${{ !github.event.pull_request.draft }} diff --git a/.github/workflows/e2e-playright.yaml b/.github/workflows/e2e-playright.yaml index 4f334e2f2..27422f0fb 100644 --- a/.github/workflows/e2e-playright.yaml +++ b/.github/workflows/e2e-playright.yaml @@ -49,7 +49,7 @@ concurrency: cancel-in-progress: true jobs: - e2e_1: + e2e_playright: runs-on: ai-ubuntu-big-boy-8-core if: ${{ !github.event.pull_request.draft }} diff --git a/.github/workflows/e2e-text-embeddings.yaml b/.github/workflows/e2e-text-embeddings.yaml index 263a60479..f11acd5ef 100644 --- a/.github/workflows/e2e-text-embeddings.yaml +++ b/.github/workflows/e2e-text-embeddings.yaml @@ -52,7 +52,7 @@ concurrency: cancel-in-progress: true jobs: - e2e_2: + e2e_text_embeddings: runs-on: ai-ubuntu-big-boy-8-core if: ${{ !github.event.pull_request.draft }} diff --git a/.github/workflows/e2e-vllm.yaml b/.github/workflows/e2e-vllm.yaml index 100f87e36..caa52d1de 100644 --- a/.github/workflows/e2e-vllm.yaml +++ b/.github/workflows/e2e-vllm.yaml @@ -52,7 +52,7 @@ concurrency: cancel-in-progress: true jobs: - e2e_1: + e2e_vllm: runs-on: ai-ubuntu-big-boy-8-core if: ${{ !github.event.pull_request.draft }} diff --git a/.github/workflows/e2e-whisper.yaml b/.github/workflows/e2e-whisper.yaml index 0220d0c05..d93f215fc 100644 --- a/.github/workflows/e2e-whisper.yaml +++ b/.github/workflows/e2e-whisper.yaml @@ -50,7 +50,7 @@ concurrency: cancel-in-progress: true jobs: - e2e_2: + e2e_whisper: runs-on: ai-ubuntu-big-boy-8-core if: ${{ !github.event.pull_request.draft }} From 3a5d7d7a1ce793bb2d51067a877ce90f2dbc800f Mon Sep 17 00:00:00 2001 From: Jon Perry Date: Thu, 25 Jul 2024 17:00:16 -0400 Subject: [PATCH 17/20] chore: update e2e-shim workflow --- .github/workflows/e2e-shim.yaml | 51 +++++++++++++++++---------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/.github/workflows/e2e-shim.yaml b/.github/workflows/e2e-shim.yaml index 95ec044e1..546a95506 100644 --- a/.github/workflows/e2e-shim.yaml +++ b/.github/workflows/e2e-shim.yaml @@ -1,30 +1,7 @@ # Catch all the things we ignore in the e2e workflow name: e2e Skip Shim on: - pull_request: - paths: - # Catch updates to the .github directory, unless it is the e2e.yaml files - - ".github/**" - - "!.github/workflows/e2e.yaml" - - # Catch docs and website things - - "**.md" - - "adr/**" - - "docs/**" - - "website/**" - - "netlify.toml" - - # Catch generic github metadata files - - "CODEOWNERS" - - ".gitignore" - - "LICENSE" - - ".pre-commit-config.yaml" - - # Catch pytests - - "tests/pytest/**" - - # Catch changes to the repeater model - - "packages/repeater/**" + pull_request permissions: @@ -47,7 +24,31 @@ concurrency: jobs: - e2e: + e2e_llama: + runs-on: ubuntu-latest + steps: + - name: Skipped + run: | + echo skipped + e2e_playright: + runs-on: ubuntu-latest + steps: + - name: Skipped + run: | + echo skipped + e2e_text_embeddings: + runs-on: ubuntu-latest + steps: + - name: Skipped + run: | + echo skipped + e2e_vllm: + runs-on: ubuntu-latest + steps: + - name: Skipped + run: | + echo skipped + e2e_whisper: runs-on: ubuntu-latest steps: - name: Skipped From 61fd76c4904fdce760678547bc188eed2e138c34 Mon Sep 17 00:00:00 2001 From: Jon Perry Date: Mon, 29 Jul 2024 14:02:24 -0400 Subject: [PATCH 18/20] chore: experiment with reusable actions for llama e2e test --- .github/actions/lfai-core/action.yaml | 28 +++++++++++++ .github/actions/python/action.yaml | 14 +++++++ .github/actions/uds-cluster/action.yaml | 22 +++++++++++ .github/workflows/e2e-llama-cpp-python.yaml | 44 ++++----------------- 4 files changed, 71 insertions(+), 37 deletions(-) create mode 100644 .github/actions/lfai-core/action.yaml create mode 100644 .github/actions/python/action.yaml create mode 100644 .github/actions/uds-cluster/action.yaml diff --git a/.github/actions/lfai-core/action.yaml b/.github/actions/lfai-core/action.yaml new file mode 100644 index 000000000..40807f8c3 --- /dev/null +++ b/.github/actions/lfai-core/action.yaml @@ -0,0 +1,28 @@ +name: setup-lfai-core +description: "Setup Supabase and LFAI-API" + +runs: + using: composite + steps: + - name: Deploy Supabase + shell: bash + run: | + make build-supabase LOCAL_VERSION=e2e-test + docker image prune -af + uds zarf tools kubectl create namespace leapfrogai + uds zarf package deploy packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst --confirm + rm packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst + + - name: Set environment variable + shell: bash + id: set-env-var + run: | + echo "ANON_KEY=$(uds zarf tools kubectl get secret supabase-bootstrap-jwt -n leapfrogai -o jsonpath='{.data.anon-key}' | base64 -d)" >> "$GITHUB_ENV" + + - name: Deploy LFAI-API + shell: bash + run: | + make build-api LOCAL_VERSION=e2e-test + docker image prune -af + uds zarf package deploy packages/api/zarf-package-leapfrogai-api-amd64-e2e-test.tar.zst --confirm + rm packages/api/zarf-package-leapfrogai-api-amd64-e2e-test.tar.zst diff --git a/.github/actions/python/action.yaml b/.github/actions/python/action.yaml new file mode 100644 index 000000000..20e4754cf --- /dev/null +++ b/.github/actions/python/action.yaml @@ -0,0 +1,14 @@ +name: setup-python +description: "Setup Python and library dependencies" + +runs: + using: composite + steps: + - name: Setup Python + uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c #v5.0.0 + with: + python-version-file: 'pyproject.toml' + + - name: Install Python Deps + run: python -m pip install ".[dev]" + shell: bash diff --git a/.github/actions/uds-cluster/action.yaml b/.github/actions/uds-cluster/action.yaml new file mode 100644 index 000000000..097db0c7e --- /dev/null +++ b/.github/actions/uds-cluster/action.yaml @@ -0,0 +1,22 @@ +name: setup-uds +description: "Setup UDS Cluster" + +inputs: + registry1Username: + description: Registry1 Username + registry1Password: + description: Registry1 Password + +runs: + using: composite + steps: + - name: Setup UDS Environment + uses: defenseunicorns/uds-common/.github/actions/setup@05f42bb3117b66ebef8c72ae050b34bce19385f5 + with: + username: ${{ inputs.registry1Username }} + password: ${{ inputs.registry1Password }} + + - name: Create UDS Cluster + shell: bash + run: | + uds deploy k3d-core-slim-dev:0.22.2 --confirm diff --git a/.github/workflows/e2e-llama-cpp-python.yaml b/.github/workflows/e2e-llama-cpp-python.yaml index 12f1e1fac..4b6dfaba8 100644 --- a/.github/workflows/e2e-llama-cpp-python.yaml +++ b/.github/workflows/e2e-llama-cpp-python.yaml @@ -59,48 +59,18 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Python - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c #v5.0.0 - with: - python-version-file: 'pyproject.toml' - - - name: Install Python Deps - run: python -m pip install "." + uses: ./.github/actions/python - - name: Setup UDS Environment - uses: defenseunicorns/uds-common/.github/actions/setup@05f42bb3117b66ebef8c72ae050b34bce19385f5 + - name: Setup UDS Cluster + uses: ./.github/actions/uds-cluster with: - username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }} - password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }} + registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }} + registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }} - - name: Create UDS Cluster - run: | - uds deploy k3d-core-slim-dev:0.22.2 --confirm - ########## - # Supabase - ########## - - name: Deploy Supabase - run: | - make build-supabase LOCAL_VERSION=e2e-test - docker image prune -af - uds zarf tools kubectl create namespace leapfrogai - uds zarf package deploy packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst --confirm - rm packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst - - name: Set environment variable - id: set-env-var - run: | - echo "ANON_KEY=$(uds zarf tools kubectl get secret supabase-bootstrap-jwt -n leapfrogai -o jsonpath='{.data.anon-key}' | base64 -d)" >> "$GITHUB_ENV" - - ########## - # API - ########## - - name: Deploy LFAI-API - run: | - make build-api LOCAL_VERSION=e2e-test - docker image prune -af - uds zarf package deploy packages/api/zarf-package-leapfrogai-api-amd64-e2e-test.tar.zst --confirm - rm packages/api/zarf-package-leapfrogai-api-amd64-e2e-test.tar.zst + - name: Setup LFAI-API and Supabase + uses: ./.github/actions/lfai-core ########## # llama From d96c60703384f6b60760ba4cb16fe9e8d03d0565 Mon Sep 17 00:00:00 2001 From: Jon Perry Date: Mon, 29 Jul 2024 14:24:28 -0400 Subject: [PATCH 19/20] chore: typo playright -> playwright --- .../workflows/{e2e-playright.yaml => e2e-playwright.yaml} | 8 ++++---- .github/workflows/e2e-shim.yaml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) rename .github/workflows/{e2e-playright.yaml => e2e-playwright.yaml} (97%) diff --git a/.github/workflows/e2e-playright.yaml b/.github/workflows/e2e-playwright.yaml similarity index 97% rename from .github/workflows/e2e-playright.yaml rename to .github/workflows/e2e-playwright.yaml index 8b0b368e9..715f0f026 100644 --- a/.github/workflows/e2e-playright.yaml +++ b/.github/workflows/e2e-playwright.yaml @@ -1,6 +1,6 @@ # End-to-end testing that deploys and tests Supabase, API, UI, and VLLM -name: e2e-playright +name: e2e-playwright on: pull_request: types: @@ -14,7 +14,7 @@ on: # Ignore updates to the .github directory, unless it's this current file - "!.github/**" - - ".github/workflows/e2e-playright.yaml" + - ".github/workflows/e2e-playwright.yaml" # Ignore docs and website things - "!**.md" @@ -45,11 +45,11 @@ on: concurrency: - group: e2e-playright-${{ github.ref }} + group: e2e-playwright-${{ github.ref }} cancel-in-progress: true jobs: - e2e_playright: + e2e_playwright: runs-on: ai-ubuntu-big-boy-8-core if: ${{ !github.event.pull_request.draft }} diff --git a/.github/workflows/e2e-shim.yaml b/.github/workflows/e2e-shim.yaml index 546a95506..c81f42ea1 100644 --- a/.github/workflows/e2e-shim.yaml +++ b/.github/workflows/e2e-shim.yaml @@ -30,7 +30,7 @@ jobs: - name: Skipped run: | echo skipped - e2e_playright: + e2e_playwright: runs-on: ubuntu-latest steps: - name: Skipped From 06f3aa4fe683d1d9734edc81f2dc26d7a63928a8 Mon Sep 17 00:00:00 2001 From: Jon Perry Date: Mon, 29 Jul 2024 14:42:55 -0400 Subject: [PATCH 20/20] chore: use custom actions to make workflows more DRY --- .github/workflows/e2e-llama-cpp-python.yaml | 2 - .github/workflows/e2e-playwright.yaml | 50 ++++----------------- .github/workflows/e2e-text-embeddings.yaml | 50 +++------------------ .github/workflows/e2e-whisper.yaml | 46 +++---------------- 4 files changed, 23 insertions(+), 125 deletions(-) diff --git a/.github/workflows/e2e-llama-cpp-python.yaml b/.github/workflows/e2e-llama-cpp-python.yaml index 4b6dfaba8..d2f0c777c 100644 --- a/.github/workflows/e2e-llama-cpp-python.yaml +++ b/.github/workflows/e2e-llama-cpp-python.yaml @@ -67,8 +67,6 @@ jobs: registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }} registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }} - - - name: Setup LFAI-API and Supabase uses: ./.github/actions/lfai-core diff --git a/.github/workflows/e2e-playwright.yaml b/.github/workflows/e2e-playwright.yaml index 715f0f026..bf6524f9b 100644 --- a/.github/workflows/e2e-playwright.yaml +++ b/.github/workflows/e2e-playwright.yaml @@ -57,14 +57,6 @@ jobs: - name: Checkout Repo uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Setup Python - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c #v5.0.0 - with: - python-version-file: 'pyproject.toml' - - - name: Install Python Deps - run: python -m pip install ".[dev]" - - name: Setup Node uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: @@ -75,47 +67,23 @@ jobs: npm --prefix src/leapfrogai_ui ci npx --prefix src/leapfrogai_ui playwright install - - name: Setup UDS Environment - uses: defenseunicorns/uds-common/.github/actions/setup@05f42bb3117b66ebef8c72ae050b34bce19385f5 - with: - username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }} - password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }} - - - name: Create UDS Cluster - run: | - uds deploy k3d-core-slim-dev:0.22.2 --confirm + - name: Setup Python + uses: ./.github/actions/python - ########## - # Supabase - ########## - - name: Deploy Supabase - run: | - make build-supabase LOCAL_VERSION=e2e-test - docker image prune -af - uds zarf tools kubectl create namespace leapfrogai - uds zarf package deploy packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst --confirm - rm packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst + - name: Setup UDS Cluster + uses: ./.github/actions/uds-cluster + with: + registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }} + registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }} - - name: Set environment variable - id: set-env-var - run: | - echo "ANON_KEY=$(uds zarf tools kubectl get secret supabase-bootstrap-jwt -n leapfrogai -o jsonpath='{.data.anon-key}' | base64 -d)" >> "$GITHUB_ENV" + - name: Setup LFAI-API and Supabase + uses: ./.github/actions/lfai-core - name: Test Supabase run: | python -m pip install requests python -m pytest ./tests/e2e/test_supabase.py -v - ########## - # API - ########## - - name: Deploy LFAI-API - run: | - make build-api LOCAL_VERSION=e2e-test - docker image prune -af - uds zarf package deploy packages/api/zarf-package-leapfrogai-api-amd64-e2e-test.tar.zst --confirm - rm packages/api/zarf-package-leapfrogai-api-amd64-e2e-test.tar.zst - - name: Test API run: | python -m pip install requests diff --git a/.github/workflows/e2e-text-embeddings.yaml b/.github/workflows/e2e-text-embeddings.yaml index f11acd5ef..d601bf75c 100644 --- a/.github/workflows/e2e-text-embeddings.yaml +++ b/.github/workflows/e2e-text-embeddings.yaml @@ -61,48 +61,16 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Python - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c #v5.0.0 - with: - python-version-file: 'pyproject.toml' - - - name: Install Python Deps - run: python -m pip install "." + uses: ./.github/actions/python - - name: Setup UDS Environment - uses: defenseunicorns/uds-common/.github/actions/setup@05f42bb3117b66ebef8c72ae050b34bce19385f5 + - name: Setup UDS Cluster + uses: ./.github/actions/uds-cluster with: - username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }} - password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }} + registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }} + registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }} - - name: Create UDS Cluster - run: | - uds deploy k3d-core-slim-dev:0.23.0 --confirm - - ########## - # Supabase - ########## - - name: Deploy Supabase - run: | - make build-supabase LOCAL_VERSION=e2e-test - docker image prune -af - uds zarf tools kubectl create namespace leapfrogai - uds zarf package deploy packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst --confirm - rm packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst - - - name: Set environment variable - id: set-env-var - run: | - echo "ANON_KEY=$(uds zarf tools kubectl get secret supabase-bootstrap-jwt -n leapfrogai -o jsonpath='{.data.anon-key}' | base64 -d)" >> "$GITHUB_ENV" - - ########## - # API - ########## - - name: Deploy LFAI-API - run: | - make build-api LOCAL_VERSION=e2e-test - docker image prune -af - uds zarf package deploy packages/api/zarf-package-leapfrogai-api-amd64-e2e-test.tar.zst --confirm - rm packages/api/zarf-package-leapfrogai-api-amd64-e2e-test.tar.zst + - name: Setup LFAI-API and Supabase + uses: ./.github/actions/lfai-core ########## # text-embeddings @@ -117,7 +85,3 @@ jobs: - name: Test text-embeddings run: | python -m pytest ./tests/e2e/test_text_embeddings.py -v - - - name: Cleanup text-embeddings - run: | - uds zarf package remove text-embeddings -l=trace --confirm diff --git a/.github/workflows/e2e-whisper.yaml b/.github/workflows/e2e-whisper.yaml index d93f215fc..f233ec20c 100644 --- a/.github/workflows/e2e-whisper.yaml +++ b/.github/workflows/e2e-whisper.yaml @@ -59,48 +59,16 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Python - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c #v5.0.0 - with: - python-version-file: 'pyproject.toml' - - - name: Install Python Deps - run: python -m pip install "." + uses: ./.github/actions/python - - name: Setup UDS Environment - uses: defenseunicorns/uds-common/.github/actions/setup@05f42bb3117b66ebef8c72ae050b34bce19385f5 + - name: Setup UDS Cluster + uses: ./.github/actions/uds-cluster with: - username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }} - password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }} - - - name: Create UDS Cluster - run: | - uds deploy k3d-core-slim-dev:0.22.2 --confirm + registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }} + registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }} - ########## - # Supabase - ########## - - name: Deploy Supabase - run: | - make build-supabase LOCAL_VERSION=e2e-test - docker image prune -af - uds zarf tools kubectl create namespace leapfrogai - uds zarf package deploy packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst --confirm - rm packages/supabase/zarf-package-supabase-amd64-e2e-test.tar.zst - - - name: Set environment variable - id: set-env-var - run: | - echo "ANON_KEY=$(uds zarf tools kubectl get secret supabase-bootstrap-jwt -n leapfrogai -o jsonpath='{.data.anon-key}' | base64 -d)" >> "$GITHUB_ENV" - - ########## - # API - ########## - - name: Deploy LFAI-API - run: | - make build-api LOCAL_VERSION=e2e-test - docker image prune -af - uds zarf package deploy packages/api/zarf-package-leapfrogai-api-amd64-e2e-test.tar.zst --confirm - rm packages/api/zarf-package-leapfrogai-api-amd64-e2e-test.tar.zst + - name: Setup LFAI-API and Supabase + uses: ./.github/actions/lfai-core ########## # whisper