Skip to content

Fix Python (sync) WatchHandle test #1648

Fix Python (sync) WatchHandle test

Fix Python (sync) WatchHandle test #1648

name: Test Python SDK
on:
workflow_call:
secrets:
E2B_API_KEY:
required: true
pull_request:
branches:
- main
permissions:
contents: read
jobs:
test:
defaults:
run:
working-directory: ./packages/python-sdk
shell: bash
name: Python SDK - Build and test (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Parse .tool-versions
uses: wistia/[email protected]
with:
filename: '.tool-versions'
uppercase: 'true'
prefix: 'tool_version_'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '${{ env.TOOL_VERSION_PYTHON }}'
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: '${{ env.TOOL_VERSION_POETRY }}'
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Install dependencies
run: poetry install
- name: Test build
run: poetry build
- name: Run tests
run: poetry run pytest --verbose --numprocesses=4
env:
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}