-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore!: uds bundle refs for upstream flavor and namespace (#977)
- Loading branch information
1 parent
11526e8
commit caf4f9c
Showing
5 changed files
with
69 additions
and
54 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,10 @@ jobs: | |
- name: Setup Python | ||
uses: ./.github/actions/python | ||
|
||
- name: Install API and SDK Dev Dependencies | ||
run : | | ||
make install | ||
- name: Setup UDS Cluster | ||
uses: ./.github/actions/uds-cluster | ||
with: | ||
|
@@ -69,45 +73,60 @@ jobs: | |
run: | | ||
cd bundles/latest/cpu | ||
uds create . --confirm && \ | ||
uds deploy uds-bundle-leapfrogai-amd64-registry1.tar.zst \ | ||
--set LEAPFROGAI_API_BASE_URL="http://leapfrogai-api.leapfrogai.svc.cluster.local:8080" --confirm --no-progress && \ | ||
uds deploy uds-bundle-leapfrogai-amd64-registry1.tar.zst --confirm --no-progress && \ | ||
rm -rf uds-bundle-leapfrogai-amd64-registry1.tar.zst && \ | ||
docker system prune -af | ||
- name: Generate Secrets | ||
id: generate_secrets | ||
run: | | ||
PASSWORD=$(cat <(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9!@#$%^&*()_+-=[]{}|;:,.<>?' | head -c 20) <(echo '!@1Aa') | fold -w1 | shuf | tr -d '\n') | ||
echo "::add-mask::$PASSWORD" | ||
echo "FAKE_E2E_USER_PASSWORD=$PASSWORD" >> $GITHUB_OUTPUT | ||
ANON_KEY=$(uds zarf tools kubectl get secret supabase-bootstrap-jwt -n leapfrogai -o jsonpath='{.data.anon-key}' | base64 -d) | ||
echo "::add-mask::$ANON_KEY" | ||
echo "ANON_KEY=$ANON_KEY" >> $GITHUB_OUTPUT | ||
SERVICE_ROLE_KEY=$(uds zarf tools kubectl get secret -n leapfrogai supabase-bootstrap-jwt -o jsonpath={.data.service-key} | base64 -d) | ||
echo "::add-mask::$SERVICE_ROLE_KEY" | ||
echo "SERVICE_ROLE_KEY=$SERVICE_ROLE_KEY" >> $GITHUB_OUTPUT | ||
FAKE_PASSWORD=$(cat <(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9!@#$%^&*()_+-=[]{}|;:,.<>?' | head -c 20) <(echo '!@1Aa') | fold -w1 | shuf | tr -d '\n') | ||
echo "::add-mask::$FAKE_PASSWORD" | ||
echo "FAKE_PASSWORD=$FAKE_PASSWORD" >> $GITHUB_OUTPUT | ||
SERVICE_KEY=$(uds zarf tools kubectl get secret -n leapfrogai supabase-bootstrap-jwt -o jsonpath={.data.service-key} | base64 -d) | ||
echo "::add-mask::$SERVICE_KEY" | ||
echo "SERVICE_KEY=$SERVICE_KEY" >> $GITHUB_OUTPUT | ||
- name: Verify Secrets | ||
run: | | ||
echo "FAKE_E2E_USER_PASSWORD is set: ${{ steps.generate_secrets.outputs.FAKE_E2E_USER_PASSWORD != '' }}" | ||
echo "FAKE_PASSWORD is set: ${{ steps.generate_secrets.outputs.FAKE_PASSWORD != '' }}" | ||
echo "ANON_KEY is set: ${{ steps.generate_secrets.outputs.ANON_KEY != '' }}" | ||
echo "SERVICE_ROLE_KEY is set: ${{ steps.generate_secrets.outputs.SERVICE_ROLE_KEY != '' }}" | ||
echo "SERVICE_KEY is set: ${{ steps.generate_secrets.outputs.SERVICE_KEY != '' }}" | ||
- name: Run Integration Tests | ||
env: | ||
SUPABASE_ANON_KEY: ${{ steps.generate_secrets.outputs.ANON_KEY }} | ||
SUPABASE_PASS: ${{ steps.generate_secrets.outputs.FAKE_PASSWORD }} | ||
SUPABASE_EMAIL: [email protected] | ||
SUPABASE_URL: https://supabase-kong.uds.dev | ||
# Turn off NIAH tests that are not applicable for integration testing using the Repeater model | ||
LFAI_RUN_NIAH_TESTS: "false" | ||
run: | | ||
uds zarf connect --name=llama-cpp-python-model --namespace=leapfrogai --local-port=50051 --remote-port=50051 & | ||
while ! nc -z localhost 50051; do sleep 1; done | ||
make test-user-pipeline | ||
env $(cat .env | xargs) python -m pytest -v -s tests/integration/api | ||
# Backends | ||
- name: Run Backend Tests | ||
- name: Run Backend E2E Tests | ||
env: | ||
ANON_KEY: ${{ steps.generate_secrets.outputs.ANON_KEY }} | ||
SERVICE_KEY: ${{ steps.generate_secrets.outputs.SERVICE_KEY }} | ||
run: | | ||
python -m pytest ./tests/e2e/test_llama.py -v | ||
python -m pytest ./tests/e2e/test_text_embeddings.py -v | ||
python -m pytest ./tests/e2e/test_whisper.py -v | ||
python -m pytest ./tests/e2e/test_supabase.py -v | ||
python -m pytest ./tests/e2e/test_api.py -v | ||
python -m pytest ./tests/e2e/test_llama.py -vv | ||
python -m pytest ./tests/e2e/test_text_embeddings.py -vv | ||
python -m pytest ./tests/e2e/test_whisper.py -vv | ||
python -m pytest ./tests/e2e/test_supabase.py -vv | ||
python -m pytest ./tests/e2e/test_api.py -vv | ||
- name: Run Playwright E2E Tests | ||
env: | ||
SERVICE_ROLE_KEY: ${{ steps.generate_secrets.outputs.SERVICE_ROLE_KEY }} | ||
FAKE_E2E_USER_PASSWORD: ${{ steps.generate_secrets.outputs.FAKE_E2E_USER_PASSWORD }} | ||
SERVICE_ROLE_KEY: ${{ steps.generate_secrets.outputs.SERVICE_KEY }} | ||
FAKE_E2E_USER_PASSWORD: ${{ steps.generate_secrets.outputs.FAKE_PASSWORD }} | ||
ANON_KEY: ${{ steps.generate_secrets.outputs.ANON_KEY }} | ||
run: | | ||
chmod +x ./.github/scripts/createUser.sh | ||
|
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
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
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
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