Skip to content

Commit

Permalink
Add deploy of demo iframe app for /api/ testing
Browse files Browse the repository at this point in the history
  • Loading branch information
huntharo committed Apr 26, 2024
1 parent a0ffbf7 commit 3811099
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ env:
# Set env to prod so we don't get an env suffix on the DNS names
NODE_ENV: ${{ secrets.NODE_ENV }}
DEMO_APP_NAME: demo-app
DEMO_IFRAME_APP_NAME: demo-iframe
STATIC_APP_NAME: static-app
NEXTJS_DEMO_APP_NAME: nextjs-demo
RELEASE_APP_NAME: release
Expand Down Expand Up @@ -355,6 +356,40 @@ jobs:
echo Testing App Method Invocation on _next/data Route
curl -H"accept: application/json" --fail "https://${EDGE_DOMAIN}${PREFIX}/${DEMO_APP_NAME}/_next/data/0.0.0/serverIncrement?currValue=1"
- name: Publish Demo App to MicroApps as iFrame App + API
run: |
npx pwrdrvr publish \
--app-name ${DEMO_IFRAME_APP_NAME} \
--type lambda-url \
--startup-type iframe \
--new-version 0.0.0 \
--deployer-lambda-name ${DEPLOYER_LAMBDA_NAME} \
--app-lambda-name ${DEMO_APP_LAMBDA_NAME} \
--static-assets-path packages/demo-app/static_files \
--default-file index.html \
--overwrite
- name: Demo IFrame App URL
uses: Sibz/github-status-action@v1
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: 'Demo IFrame App URL on ${{ matrix.deployName }}'
description: 'Passed'
state: 'success'
sha: ${{github.event.pull_request.head.sha || github.sha}}
target_url: https://${{ steps.getCDKExports.outputs.edgeDomain }}${{ steps.getCDKExports.outputs.prefix }}/${{ env.DEMO_IFRAME_APP_NAME }}/?appver=0.0.0

- name: Test Demo IFrame App
run: |
echo Testing App Frame Loading
curl -H"accept: text/html" --fail https://${EDGE_DOMAIN}${PREFIX}/${DEMO_IFRAME_APP_NAME}/
echo Testing App HTML Loading
curl -H"accept: text/html" --fail https://${EDGE_DOMAIN}${PREFIX}/${DEMO_IFRAME_APP_NAME}/0.0.0/index.html
echo Testing App Method Invocation
curl -H"accept: application/json" --fail "https://${EDGE_DOMAIN}${PREFIX}/${DEMO_IFRAME_APP_NAME}/0.0.0/serverIncrement?currValue=1"
echo Testing App Method Invocation on _next/data Route
curl -H"accept: application/json" --fail "https://${EDGE_DOMAIN}${PREFIX}/${DEMO_IFRAME_APP_NAME}/api/serverIncrement?currValue=1"
- name: Publish Demo App to MicroApps - To Delete
run: |
npx pwrdrvr publish \
Expand Down

0 comments on commit 3811099

Please sign in to comment.