Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/cli_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
required: false
type: string
default: ''
run:
description: 'Whether to actually run the build and tests. When false the matrix jobs are skipped (reported as success to required checks).'
required: false
type: boolean
default: true
secrets:
E2B_API_KEY:
required: true
Expand All @@ -16,6 +21,7 @@ permissions:

jobs:
test:
if: ${{ inputs.run }}
defaults:
run:
working-directory: ./packages/cli
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/generated_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,35 @@ permissions:
contents: read

jobs:
changes:
name: Detect changes
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
generated: ${{ steps.filter.outputs.generated }}
steps:
- name: Filter changed paths
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
generated:
- 'spec/**'
- 'codegen.Dockerfile'
- 'Makefile'
- 'packages/**'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'package.json'
- '.tool-versions'
- '.github/workflows/generated_files.yml'
Comment thread
cursor[bot] marked this conversation as resolved.

check-generated:
name: Generated files
needs: changes
if: ${{ needs.changes.outputs.generated == 'true' }}
runs-on: ubuntu-latest

steps:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/js_sdk_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
required: false
type: string
default: ''
run:
description: 'Whether to actually run the build and tests. When false the matrix jobs are skipped (reported as success to required checks).'
required: false
type: boolean
default: true
secrets:
E2B_API_KEY:
required: true
Expand All @@ -16,6 +21,7 @@ permissions:

jobs:
test:
if: ${{ inputs.run }}
defaults:
run:
working-directory: ./packages/js-sdk
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,37 @@ on:
pull_request:

jobs:
changes:
name: Detect changes
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
code: ${{ steps.filter.outputs.code }}
steps:
- name: Filter changed paths
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
code:
- 'packages/**'
- 'spec/**'
- '.eslintrc.cjs'
- '.prettierrc'
- '.prettierignore'
- '.editorconfig'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'package.json'
- '.tool-versions'
- '.github/workflows/lint.yml'

lint:
name: Lint
needs: changes
if: ${{ needs.changes.outputs.code == 'true' }}
runs-on: ubuntu-latest

steps:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/python_sdk_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
required: false
type: string
default: ''
run:
description: 'Whether to actually run the build and tests. When false the matrix jobs are skipped (reported as success to required checks).'
required: false
type: boolean
default: true
secrets:
E2B_API_KEY:
required: true
Expand All @@ -16,6 +21,7 @@ permissions:

jobs:
test:
if: ${{ inputs.run }}
defaults:
run:
working-directory: ./packages/python-sdk
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/sdk_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,101 @@ permissions:
contents: read

jobs:
changes:
name: Detect changes
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
js: ${{ steps.filter.outputs.js }}
python: ${{ steps.filter.outputs.python }}
cli: ${{ steps.filter.outputs.cli }}
steps:
- name: Filter changed paths
# On workflow_dispatch there is no PR diff and paths-filter would fall
# back to git (failing without a checkout); the run inputs below force a
# full run for that event instead, so we only filter on pull_request.
if: github.event_name == 'pull_request'
uses: dorny/paths-filter@v3
Comment thread
mishushakov marked this conversation as resolved.
id: filter
with:
filters: |
shared: &shared
- '.github/workflows/sdk_tests.yml'
- 'spec/**'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'package.json'
- '.tool-versions'
js:
- *shared
- '.github/workflows/js_sdk_tests.yml'
- 'packages/js-sdk/**'
python:
- *shared
- '.github/workflows/python_sdk_tests.yml'
- 'packages/python-sdk/**'
- 'packages/connect-python/**'
cli:
- *shared
- '.github/workflows/cli_tests.yml'
- 'packages/cli/**'
- 'packages/js-sdk/**'
Comment thread
cursor[bot] marked this conversation as resolved.

js-tests:
name: Production / JS SDK Tests
needs: changes
uses: ./.github/workflows/js_sdk_tests.yml
with:
run: ${{ needs.changes.outputs.js == 'true' || github.event_name == 'workflow_dispatch' }}
secrets:
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}

python-tests:
name: Production / Python SDK Tests
needs: changes
uses: ./.github/workflows/python_sdk_tests.yml
with:
run: ${{ needs.changes.outputs.python == 'true' || github.event_name == 'workflow_dispatch' }}
secrets:
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}

cli-tests:
name: Production / CLI Tests
needs: changes
uses: ./.github/workflows/cli_tests.yml
with:
run: ${{ needs.changes.outputs.cli == 'true' || github.event_name == 'workflow_dispatch' }}
secrets:
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}

js-tests-staging:
name: Staging / JS SDK Tests
needs: changes
uses: ./.github/workflows/js_sdk_tests.yml
with:
E2B_DOMAIN: ${{ vars.E2B_DOMAIN_STAGING }}
run: ${{ needs.changes.outputs.js == 'true' || github.event_name == 'workflow_dispatch' }}
secrets:
E2B_API_KEY: ${{ secrets.E2B_API_KEY_STAGING }}

python-tests-staging:
name: Staging / Python SDK Tests
needs: changes
uses: ./.github/workflows/python_sdk_tests.yml
with:
E2B_DOMAIN: ${{ vars.E2B_DOMAIN_STAGING }}
run: ${{ needs.changes.outputs.python == 'true' || github.event_name == 'workflow_dispatch' }}
secrets:
E2B_API_KEY: ${{ secrets.E2B_API_KEY_STAGING }}

cli-tests-staging:
name: Staging / CLI Tests
needs: changes
uses: ./.github/workflows/cli_tests.yml
with:
E2B_DOMAIN: ${{ vars.E2B_DOMAIN_STAGING }}
run: ${{ needs.changes.outputs.cli == 'true' || github.event_name == 'workflow_dispatch' }}
secrets:
E2B_API_KEY: ${{ secrets.E2B_API_KEY_STAGING }}
25 changes: 25 additions & 0 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,33 @@ on:
pull_request:

jobs:
changes:
name: Detect changes
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
code: ${{ steps.filter.outputs.code }}
steps:
- name: Filter changed paths
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
code:
- 'packages/**'
- 'spec/**'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'package.json'
- '.tool-versions'
- '.github/workflows/typecheck.yml'

typecheck:
name: Typecheck
needs: changes
if: ${{ needs.changes.outputs.code == 'true' }}
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
Loading