Skip to content
This repository has been archived by the owner on Feb 15, 2025. It is now read-only.

chore: split e2e.yaml into multiple workflows #808

Merged
merged 21 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions .github/workflows/e2e-llama-cpp-python.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# End-to-end testing that deploys Supabase and the API, and deploy/tests llama-cpp-python, text-embeddings, and whisper

name: e2e-llama-cpp-python
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-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-cpp-python-${{ github.ref }}
cancel-in-progress: true

jobs:
e2e_llama:
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 pytest ./tests/e2e/test_llama.py -v
90 changes: 15 additions & 75 deletions .github/workflows/e2e.yaml → .github/workflows/e2e-playright.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: e2e
# End-to-end testing that deploys and tests Supabase, API, UI, and VLLM

name: e2e-playright
on:
pull_request:
types:
Expand All @@ -12,7 +14,7 @@ on:

# Ignore updates to the .github directory, unless it's this current file
- "!.github/**"
- ".github/workflows/e2e.yaml"
- ".github/workflows/e2e-playright.yaml"

# Ignore docs and website things
- "!**.md"
Expand All @@ -29,19 +31,25 @@ 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 changes to unrelated packages
- "!packages/k3d-gpu/**"
- "!packages/llama-cpp-python/**"
- "!packages/repeater/**"
- "!packages/text-embeddings/**"
- "!packages/vllm/**"
- "!packages/whisper/**"



concurrency:
group: e2e-${{ github.ref }}
group: e2e-playright-${{ github.ref }}
cancel-in-progress: true

jobs:
e2e:
e2e_playright:
runs-on: ai-ubuntu-big-boy-8-core
if: ${{ !github.event.pull_request.draft }}

Expand Down Expand Up @@ -75,7 +83,7 @@ jobs:

- name: Create UDS Cluster
run: |
uds deploy k3d-core-slim-dev:0.23.0 --confirm
uds deploy k3d-core-slim-dev:0.22.2 --confirm

##########
# Supabase
Expand Down Expand Up @@ -133,71 +141,3 @@ jobs:
- name: Cleanup UI
run: |
uds zarf package remove leapfrogai-ui --confirm

##########
# 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 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
##########
- name: Deploy text-embeddings
run: |
make build-text-embeddings LOCAL_VERSION=e2e-test
docker image prune -af
uds zarf package deploy packages/text-embeddings/zarf-package-text-embeddings-amd64-e2e-test.tar.zst -l=trace --confirm
rm packages/text-embeddings/zarf-package-text-embeddings-amd64-e2e-test.tar.zst

- 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

##########
# 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

##########
# 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
51 changes: 26 additions & 25 deletions .github/workflows/e2e-shim.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand Down
Loading