Skip to content

Commit

Permalink
merge origin main, 0.12.2 registry1 published
Browse files Browse the repository at this point in the history
  • Loading branch information
justinthelaw committed Sep 10, 2024
1 parent 36d9854 commit 2893f7c
Showing 1 changed file with 42 additions and 9 deletions.
51 changes: 42 additions & 9 deletions .github/workflows/e2e-registry1-weekly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Create UDS Cluster
shell: bash
run: |
make create-uds-cpu-cluster
UDS_CONFIG=.github/config/uds-config.yaml make create-uds-cpu-cluster
- name: Setup Playwright
run: |
Expand All @@ -81,7 +81,7 @@ jobs:
run: |
cd bundles/latest/cpu
uds create . --confirm && \
uds deploy --set DISABLE_KEYCLOAK=true uds-bundle-leapfrogai-amd64-registry1.tar.zst --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
Expand All @@ -91,29 +91,62 @@ jobs:
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
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_PASSWORD is set: ${{ steps.generate_secrets.outputs.FAKE_PASSWORD != '' }}"
echo "ANON_KEY is set: ${{ steps.generate_secrets.outputs.ANON_KEY != '' }}"
echo "SERVICE_KEY is set: ${{ steps.generate_secrets.outputs.SERVICE_KEY != '' }}"
# TODO: enable for post-0.12.2 release of LeapfrogAI
# - name: Run Integration Tests
# if: github.sha == 'YOUR_SPECIFIC_COMMIT_SHA'
# 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_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
./.github/scripts/createUser.sh
cp src/leapfrogai_ui/.env.example src/leapfrogai_ui/.env
mkdir -p playwright/auth
touch playwright/auth.user.json
TEST_ENV=CI PUBLIC_DISABLE_KEYCLOAK=true PUBLIC_SUPABASE_ANON_KEY=$ANON_KEY npm --prefix src/leapfrogai_ui run test:integration:ci
SERVICE_ROLE_KEY=$SERVICE_ROLE_KEY TEST_ENV=CI USERNAME=doug PASSWORD=$FAKE_E2E_USER_PASSWORD PUBLIC_SUPABASE_ANON_KEY=$ANON_KEY npm --prefix src/leapfrogai_ui run test:integration:ci
- name: Archive Playwright Report
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
Expand Down

0 comments on commit 2893f7c

Please sign in to comment.