mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
d74ee11042
Depot Startup plan (unlimited minutes) for consistent runner quality across unit-test workflows. Extends the pattern from PR #4018. Also adds the id-token: write permission required for Depot OIDC auth, alongside contents: read for least-privilege defaults.
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: test / unit / python-sdk
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "sdk-python/**"
|
|
- ".github/workflows/test_unit-python-sdk.yml"
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- "sdk-python/**"
|
|
- ".github/workflows/test_unit-python-sdk.yml"
|
|
|
|
# Least-privilege by default. Individual jobs/steps can widen when needed.
|
|
# id-token: write is required for Depot OIDC auth (runs-on: depot-ubuntu-*).
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: depot-ubuntu-24.04-4
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install Poetry
|
|
uses: snok/install-poetry@v1
|
|
with:
|
|
version: latest
|
|
virtualenvs-create: true
|
|
virtualenvs-in-project: true
|
|
|
|
- name: Install dependencies
|
|
working-directory: sdk-python
|
|
run: poetry lock && poetry install --with dev
|
|
|
|
- name: Run tests
|
|
working-directory: sdk-python
|
|
run: poetry run python -m pytest tests/ -v
|