-
Notifications
You must be signed in to change notification settings - Fork 1.1k
52 lines (49 loc) · 1.33 KB
/
call_server_tests.yml
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
name: call_server_tests
on:
workflow_call:
inputs:
os:
required: false
type: string
default: ubuntu-latest
python-version:
required: true
type: string
workflow_dispatch:
inputs:
os:
required: false
type: string
default: ubuntu-latest
python-version:
required: false
type: string
default: "3.12"
commit_id:
description: 'Branch or Commit ID (optional)'
required: false
type: string
jobs:
server-tests:
runs-on: ${{ inputs.os }}
steps:
- name: checkout repo
uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install pytest
pip install -e .[all,test]
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run server tests
shell: bash
run: |
pytest --cov=guidance --cov-report=xml --cov-report=term-missing \
./tests/server