diff --git a/.github/workflows/_e2e.yml b/.github/workflows/_e2e.yml index 1b256bf6294..8956e3e8293 100644 --- a/.github/workflows/_e2e.yml +++ b/.github/workflows/_e2e.yml @@ -18,9 +18,6 @@ on: isGraphQlTransport: type: boolean required: true - isAppsBackend: - type: boolean - required: true isDevelop: type: boolean required: true @@ -72,9 +69,7 @@ jobs: - name: Run TS SDK e2e tests if: inputs.isTypescriptSDK || inputs.isRust || inputs.isDevelop run: pnpm dlx concurrently --kill-others --success command-1 "$E2E_RUN_LOCAL_NET_CMD" 'pnpm --filter @iota/iota-sdk test:e2e' - - name: Run Apps Backend e2e tests - if: inputs.isAppsBackend - run: pnpm --filter apps-backend test:e2e + - name: Run RPC/GraphQL compatibility e2e tests if: inputs.isGraphQlTransport || inputs.isRust || inputs.isDevelop run: pnpm dlx concurrently --kill-others --success command-1 "$E2E_RUN_LOCAL_NET_CMD" 'pnpm --filter @iota/graphql-transport test:e2e' diff --git a/.github/workflows/apps_backend_deploy.yml b/.github/workflows/apps_backend_deploy.yml index 38c919e73f5..5ab404ad0d7 100644 --- a/.github/workflows/apps_backend_deploy.yml +++ b/.github/workflows/apps_backend_deploy.yml @@ -62,6 +62,8 @@ jobs: id: deploy_url if: ${{ inputs.isProd == false }} run: echo "DEPLOY_URL=$(cat vercel_output.txt | awk 'END{print}')" >> $GITHUB_OUTPUT + - name: E2E tests for deployed URL + run: DEPLOY_URL=${{ steps.deploy_url.outputs.DEPLOY_URL }} pnpm --filter apps-backend test:e2e - name: Comment on pull request if: ${{ inputs.isProd == false }} uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # pin@v7 diff --git a/.github/workflows/hierarchy.yml b/.github/workflows/hierarchy.yml index 1bf23ce0228..271ca95fc5d 100644 --- a/.github/workflows/hierarchy.yml +++ b/.github/workflows/hierarchy.yml @@ -134,7 +134,7 @@ jobs: isRust: ${{ needs.diff.outputs.isRust == 'true' }} e2e: - if: (!cancelled() && !failure() && (github.event.pull_request.draft || github.ref_name == 'develop')) + if: (!cancelled() && !failure() && (!github.event.pull_request.draft || github.ref_name == 'develop')) needs: - diff - dprint-format @@ -147,7 +147,6 @@ jobs: isExplorer: ${{ needs.diff.outputs.isExplorer == 'true' }} isTypescriptSDK: ${{ needs.diff.outputs.isTypescriptSDK == 'true' }} isGraphQlTransport: ${{ needs.diff.outputs.isGraphQlTransport == 'true' }} - isAppsBackend: ${{ needs.diff.outputs.isAppsBackend == 'true' }} isDevelop: ${{ github.ref_name == 'develop' }} vercel-deploy: @@ -160,7 +159,7 @@ jobs: uses: ./.github/workflows/_vercel_deploy.yml secrets: inherit with: - shouldDeployPreview: ${{github.event_name == 'pull_request' && github.event.pull_request.draft == false}} + shouldDeployPreview: ${{github.event_name == 'pull_request' && github.event.pull_request.draft == true}} isExplorer: ${{ needs.diff.outputs.isExplorer == 'true' }} isTypescriptSDK: ${{ needs.diff.outputs.isTypescriptSDK == 'true' }} isAppsBackend: ${{ needs.diff.outputs.isAppsBackend == 'true' }} diff --git a/apps/apps-backend/test/health.e2e-spec.ts b/apps/apps-backend/test/health.e2e-spec.ts index cde735e7a57..6811fed853f 100644 --- a/apps/apps-backend/test/health.e2e-spec.ts +++ b/apps/apps-backend/test/health.e2e-spec.ts @@ -22,7 +22,13 @@ describe('Health Check (e2e)', () => { await app.close(); }); - it('/health (GET)', () => { - return request(app.getHttpServer()).get('/health').expect(200).expect({ status: 'ok' }); + it('/health (GET)', async () => { + const DEPLOYED_URL = process.env.DEPLOYED_URL || null; + + if (DEPLOYED_URL) { + await request(DEPLOYED_URL).get('/health').expect(200).expect({ status: 'ok' }); + } else { + await request(app.getHttpServer()).get('/health').expect(200).expect({ status: 'ok' }); + } }); });