Skip to content

chore: update speakeasy-api/sdk-generation-action reference #209

chore: update speakeasy-api/sdk-generation-action reference

chore: update speakeasy-api/sdk-generation-action reference #209

name: Running the examples
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
run_examples:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- name: Checkout code
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
- name: Set VERSION
run: |
VERSION=$(echo ${{ matrix.python-version }} | tr -d .)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Set MISTRAL_API_KEY using VERSION
run: |
echo "MISTRAL_API_KEY=${{ secrets[format('CI_MISTRAL_API_KEY_PYTHON_{0}', env.VERSION)] }}" >> $GITHUB_ENV
- name: Build the package
run: |
touch README-PYPI.md # Create this file since the client is not built by Speakeasy
uv build
- name: Install client with extras and run all examples.
run: |
PACKAGE="dist/$(ls dist | grep whl | head -n 1)[agents]"
uv pip install --system "$PACKAGE"
./scripts/run_examples.sh
env:
MISTRAL_AGENT_ID: ${{ secrets.CI_AGENT_ID }}
MISTRAL_API_KEY: ${{ env.MISTRAL_API_KEY }}