Skip to content

Commit

Permalink
Update E2E Test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MatKuhr committed Aug 3, 2024
1 parent 482d63c commit b28bc62
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
21 changes: 7 additions & 14 deletions .github/workflows/e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ jobs:
secret-name: AI_CORE_PRODUCTION
name: "Build and Test"
runs-on: ubuntu-latest
env:
WGET_ARGS: "-qO- -S --content-on-error"
WGET_URL: "localhost:8080"
steps:
- name: "Checkout repository"
uses: actions/checkout@v4
Expand All @@ -34,12 +31,12 @@ jobs:
- name: Create .env file
env:
aicore: ${{ secrets[matrix.secret-name] }}
working-directory: ./sample-code
run: |
echo "aicore='$aicore'" > .env
echo "aicore='$aicore'" > sample-code/.env
echo "aicore='$aicore'" > tests/e2e-tests/.env
url=$(echo "$aicore" | jq -r '.serviceurls.AI_API_URL' | sed 's|^https://||')
echo "Using AI Core ${{ matrix.environment }} instance on $url"
- name: "Start App"
- name: "Check Sample App Starts Up"
working-directory: ./sample-code
run: |
pnpm run local &
Expand All @@ -52,15 +49,11 @@ jobs:
exit 1
fi
done
- name: "Health Check"
run: |
wget "$WGET_ARGS" "$WGET_URL/health"
- name: "OpenAI Chat Completion"
run: |
wget "$WGET_ARGS" "$WGET_URL/llm"
- name: "OpenAI Text Embedding"
wget -qO- -S --content-on-error localhost:8080
- name: "Execute E2E Tests"
working-directory: ./tests/e2e-tests
run: |
wget "$WGET_ARGS" "$WGET_URL/embedding"
pnpm run e2e-test
- name: "Slack Notification"
if: false
uses: slackapi/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ packages:
# sample code
- 'sample-code'
# exclude packages that are inside test directories
- '!tests/e2e-tests' # including the e2e tests makes causes pnpm to explode
- '!tests/e2e-tests' # including the e2e tests causes pnpm to explode
- '!poc/'
- '!test-util'
- '!tests/type-tests'

0 comments on commit b28bc62

Please sign in to comment.