-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (51 loc) · 1.71 KB
/
smoketests.yml
File metadata and controls
59 lines (51 loc) · 1.71 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
51
52
53
54
55
56
57
58
59
name: Smoketests
on:
workflow_dispatch:
inputs:
environment:
description: "Target environment"
type: choice
default: dev
options:
- dev
- prod
jobs:
smoketests:
runs-on: ubuntu-slim
timeout-minutes: 120
steps:
- name: Checkout
uses: runloopai/checkout@main
- name: Setup uv
uses: runloopai/setup-uv@main
with:
python-version: "3.11"
- name: Create virtualenv
run: uv venv
- name: Install dependencies
run: |
uv pip install -r requirements-dev.lock
- name: Configure environment
env:
DEV_KEY: ${{ secrets.RUNLOOP_SMOKETEST_DEV_API_KEY }}
PROD_KEY: ${{ secrets.RUNLOOP_SMOKETEST_PROD_API_KEY }}
run: |
if [ "${{ github.event.inputs.environment }}" = "prod" ]; then
echo "RUNLOOP_API_KEY=${PROD_KEY}" >> $GITHUB_ENV
echo "RUNLOOP_BASE_URL=https://api.runloop.ai" >> $GITHUB_ENV
else
echo "RUNLOOP_API_KEY=${DEV_KEY}" >> $GITHUB_ENV
echo "RUNLOOP_BASE_URL=https://api.runloop.pro" >> $GITHUB_ENV
fi
echo "DEBUG=false" >> $GITHUB_ENV
echo "PYTHONPATH=${{ github.workspace }}/src" >> $GITHUB_ENV
echo "RUN_EXAMPLE_LIVE_TESTS=1" >> $GITHUB_ENV
- name: Verify generated example artifacts
run: uv run python scripts/generate_examples_md.py --check
- name: Run smoke tests (pytest via uv)
env:
# Use 5 workers to run files in parallel.
# Tests within a file are run sequentially.
PYTEST_ADDOPTS: "-n 5 -m smoketest"
run: |
uv run pytest -q -vv tests/smoketests