-
Notifications
You must be signed in to change notification settings - Fork 173
50 lines (41 loc) · 1.37 KB
/
run_example_scripts.yaml
File metadata and controls
50 lines (41 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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: |
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_API_KEY: ${{ env.MISTRAL_API_KEY }}