forked from mlflow/mlflow
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (49 loc) · 1.42 KB
/
gateway.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
52
53
54
55
name: ⛩ Gateway ⛩
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
push:
branches:
- master
- branch-[0-9]+.[0-9]+
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash --noprofile --norc -exo pipefail {0}
env:
PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu
jobs:
gateway:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/untracked
- uses: ./.github/actions/setup-python
- name: Install dependencies
run: |
pip install .[gateway] \
pytest pytest-timeout pytest-asyncio \
httpx psutil sentence-transformers transformers torchvision openai databricks-sdk
# Ensure pydantic v2 is installed
pip freeze | tail -n +1 | grep -q '^pydantic==2\.'
- name: Run tests with pydantic v2
run: |
pytest tests/gateway
- name: Downgrade pydantic to v1
run: |
pip install 'pydantic<2.0'
# Ensure pydantic v1 is installed
pip freeze | tail -n +1 | grep -q '^pydantic==1\.'
- name: Run tests with pydantic v1
run: |
pytest tests/gateway