Skip to content

Add Functions gRPC core helpers #4

Add Functions gRPC core helpers

Add Functions gRPC core helpers #4

name: 🧪 Functions Host E2E Tests
# Gated Azure Functions host E2E suite. It launches a real `func start` host for
# test/e2e-functions/test-app (backed by Azurite / AzureStorage) and drives the
# app over HTTP, porting the extension repo's `BasicNode` app + xUnit tests.
#
# The test-app consumes the IN-REPO `durable-functions` (compat) package and core
# `@microsoft/durabletask-js` via `file:` links, so those packages must be BUILT
# before the test-app install (see the build step below). The suite self-gates:
# each spec SKIPS cleanly when the Azure Functions Core Tools (`func`) or the
# Azurite storage emulator are unavailable, and RUNS when both are present. In CI
# below we install and start both, so the suite runs for real; the self-skip is
# the safety net that keeps the job green if a prerequisite fails to come up.
#
# Triggering: this suite runs automatically on pull requests that touch the
# Functions surface (`test/e2e-functions/**`, `packages/azure-functions-durable/**`,
# or this workflow file), and can also be started ad hoc from the Actions tab via
# "Run workflow" (workflow_dispatch). It is intentionally scoped to the Functions
# surface and does NOT gate core-only PRs, which have their own suites. A small set
# of terminal/invalid-state control-plane specs are skipped pending a server-side
# gRPC status-detail fix (tracked separately); everything else runs for real. NOTE:
# workflow_dispatch only appears in the Actions UI once this file exists on the
# repository's default branch.
on:
workflow_dispatch:
pull_request:
paths:
- "test/e2e-functions/**"
- "packages/azure-functions-durable/**"
- ".github/workflows/functions-e2e-tests.yaml"
permissions:
contents: read
jobs:
functions-e2e-tests:
strategy:
fail-fast: false
matrix:
node-version: ["22.x"]
name: "functions-e2e (node ${{ matrix.node-version }})"
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: ⚙️ NodeJS - Install
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: ${{ matrix.node-version }}
registry-url: "https://registry.npmjs.org"
# Root install provides jest + ts-jest used to run the spec files, and lets
# the workspace build below resolve the in-repo packages the test-app links
# via `file:` refs.
- name: ⚙️ Install dependencies
run: npm ci
# Build the in-repo compat package (`durable-functions`); its build script
# runs `build:core` first, so this also builds `packages/durabletask-js` into
# dist/. Both must exist before the test-app's `file:`-linked install below.
- name: "🏗️ Build in-repo durable-functions (+ core) for file: linking"
run: npm run build -w durable-functions
- name: 🔧 Install Azurite and Azure Functions Core Tools
run: npm install -g azurite azure-functions-core-tools@4
# --skipApiVersionCheck: the preview extension bundle's Azure Storage SDK
# targets a newer REST API version than current Azurite accepts; without the
# flag Azurite rejects the calls and every orchestration times out.
- name: 🗄️ Start Azurite
run: |
mkdir -p /tmp/azurite
azurite --silent --skipApiVersionCheck --location /tmp/azurite \
--blobPort 10000 --queuePort 10001 --tablePort 10002 &
echo "Waiting for Azurite blob endpoint..."
for i in $(seq 1 30); do
if (echo > /dev/tcp/127.0.0.1/10000) >/dev/null 2>&1; then
echo "Azurite is up."
break
fi
sleep 1
done
# Installs the in-repo `durable-functions` (+ core `@microsoft/durabletask-js`)
# packages via the test-app's `file:` refs and compiles the ported BasicNode
# app to dist/ (consumed by `func start`).
- name: 📦 Install + build test-app
working-directory: test/e2e-functions/test-app
run: |
npm install
npm run build
- name: ✅ Run Functions host E2E tests
run: npm run test:e2e:functions:internal
timeout-minutes: 20