54 lines
1.1 KiB
YAML
54 lines
1.1 KiB
YAML
name: Test Python SDK
|
|
|
|
on:
|
|
push:
|
|
# Tests are already running on main before release
|
|
branches:
|
|
- '**'
|
|
- '!main'
|
|
paths:
|
|
- packages/python-sdk/**/*
|
|
- .github/workflows/python_sdk_tests.yml
|
|
workflow_call:
|
|
secrets:
|
|
E2B_API_KEY:
|
|
required: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
publish:
|
|
defaults:
|
|
run:
|
|
working-directory: ./packages/python-sdk
|
|
name: Build and test SDK
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: Install and configure Poetry
|
|
uses: snok/install-poetry@v1
|
|
with:
|
|
version: 1.5.1
|
|
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 -n 1 --verbose
|
|
env:
|
|
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
|