Handle missing request body #2918
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR checks | |
on: | |
pull_request: | |
workflow_dispatch: | |
workflow_call: | |
concurrency: | |
group: pr-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
NODE_AUTH_TOKEN: nothing | |
jobs: | |
inngest_test: | |
name: "inngest: Runtime tests" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: packages/inngest | |
strategy: | |
fail-fast: false | |
matrix: | |
nodeVersion: | |
- 14 | |
- 16 | |
- 18 | |
- 20 | |
- 22 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-and-build | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.nodeVersion }} | |
# Uses npm as pnpm doesn't support Node < 16 | |
# If we're on Node <18, restrict some framework tests that do not support | |
# Node on this version. | |
- run: | | |
node --version | |
npm --version | |
npm run test -- --testPathIgnorePatterns "<rootDir>/src/hono.test.ts" | |
if: ${{ matrix.nodeVersion < 18 }} | |
- run: | | |
node --version | |
npm --version | |
npm run test | |
if: ${{ matrix.nodeVersion >= 18 }} | |
inngest_types: | |
name: "inngest: Type tests" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: packages/inngest | |
strategy: | |
fail-fast: false | |
matrix: | |
tsVersion: | |
- "latest" | |
- "~5.7.0" | |
- "~5.6.0" | |
- "~5.5.0" | |
- "~5.4.0" | |
- "~5.3.0" | |
- "~5.2.0" | |
- "~5.1.0" | |
- "~5.0.0" | |
- "~4.9.0" | |
- "~4.8.0" | |
- "~4.7.0" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-and-build | |
- run: pnpm add -D typescript@${{ matrix.tsVersion }} | |
- run: pnpm run test:types | |
- run: pnpm run test:dist | |
inngest_api_diff: | |
name: "inngest: Local API diff" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: packages/inngest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-and-build | |
inngest_lint: | |
name: "inngest: Lint" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: packages/inngest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-and-build | |
- run: pnpm run lint | |
inngest_test_dist: | |
name: "inngest: Dist tests" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: packages/inngest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-and-build | |
- run: pnpm run test:dist | |
inngest_test_deps: | |
name: "inngest: Dependency tests" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: packages/inngest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-and-build | |
- run: pnpm run test:deps | |
inngest_test_composite: | |
name: "inngest: Composite tests" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: packages/inngest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-and-build | |
- run: pnpm run test:composite | |
"eslint-plugin_test": | |
name: "eslint-plugin: Test" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: packages/eslint-plugin | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-and-build | |
with: | |
install-dependencies: false | |
build: false | |
- run: pnpm install | |
- run: pnpm test | |
"middleware-encryption_test": | |
name: "middleware-encryption: Test" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: packages/middleware-encryption | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-and-build | |
with: | |
install-dependencies: false | |
build: false | |
- run: pnpm install | |
- run: pnpm test | |
"middleware-validation_test": | |
name: "middleware-validation: Test" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: packages/middleware-validation | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-and-build | |
with: | |
install-dependencies: false | |
build: false | |
- run: pnpm install | |
- run: pnpm test | |
package_inngest: | |
name: "inngest: Package" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: packages/inngest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-and-build | |
- name: Package as tarball | |
run: pnpm run local:pack | |
- name: Archive package tarball | |
uses: actions/upload-artifact@v3 | |
with: | |
name: inngestpkg | |
path: packages/inngest/inngest.tgz | |
examples-matrix: | |
name: Create examples test matrix | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v3 | |
- id: matrix | |
run: | | |
blocklist=$(grep -v '^#' examples/.inngestignore | jq -R . | jq -s .) | |
echo "matrix=$(find examples -mindepth 1 -maxdepth 1 -type d \( -name 'framework-*' -or -name 'bun*' \) | grep -v -f <(echo $blocklist | jq -r '.[]') | xargs -n 1 basename | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT | |
examples: | |
name: Test examples | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: packages/inngest | |
needs: [examples-matrix, package_inngest] | |
strategy: | |
fail-fast: false | |
matrix: | |
example: ${{ fromJson(needs.examples-matrix.outputs.matrix) }} | |
streaming: [""] | |
include: | |
- example: framework-remix | |
streaming: force | |
- example: framework-nextjs-app-router | |
streaming: force | |
steps: | |
# Checkout the repo | |
- name: Checkout SDK | |
uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-and-build | |
- name: Download pre-built SDK | |
uses: actions/download-artifact@v3 | |
with: | |
name: inngestpkg | |
path: packages/inngest | |
- name: Run integration tests | |
run: pnpm run itest ${{ matrix.example }} | |
env: | |
INNGEST_STREAMING: ${{ matrix.streaming }} |