INN-2223 Add step.invoke()
and basis for inngest.invoke()
#1719
Workflow file for this run
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: | |
push: | |
branches: | |
- 'renovate/**' | |
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 | |
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 | |
- run: node --version && npm --version && npm run test | |
inngest_types: | |
name: "inngest: Type tests" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: packages/inngest | |
strategy: | |
fail-fast: false | |
matrix: | |
tsVersion: | |
- 'latest' | |
- '~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 | |
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 | |
- run: pnpm run api-extractor run | |
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 | |
"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 | |
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-*' | 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) }} | |
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 }} |