-
Notifications
You must be signed in to change notification settings - Fork 149
48 lines (41 loc) · 1.25 KB
/
server_tests.yaml
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
name: Server Tests
on:
pull_request:
paths:
- ".github/workflows/server_tests.yaml"
- "server/**"
- "proto/**"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
run_tests:
runs-on: ubuntu-latest
steps:
- name: Adding actions/checkout@v2
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.10"
- name: Run black fmt
run: |
pip install black
python -m black --check server/lorax_server
- name: Install Protoc
uses: arduino/setup-protoc@v1
- name: Filter test dependencies
run: |
# remove stanford-stk from test requirements as it cannot install correctly without GPUs
sed -i '/stanford-stk/d' server/requirements.txt
sed -i '/stanford-stk/d' server/pyproject.toml
- name: Install
run: |
make install-server install-custom-kernels
- name: Run server tests
run: |
pip install pytest
export HUGGING_FACE_HUB_TOKEN=${{ secrets.HUGGING_FACE_HUB_TOKEN }}
pytest -s -vv server/tests