-
Notifications
You must be signed in to change notification settings - Fork 690
68 lines (66 loc) · 1.86 KB
/
unit_test.yml
File metadata and controls
68 lines (66 loc) · 1.86 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
60
61
62
63
64
65
66
67
68
name: unit-test
on:
pull_request:
paths:
- ".github/workflows/unit_test.yml"
- "cmake/**"
- "src/**"
- "tests/**"
- "3rdparty/**"
- "lmdeploy/**"
- "requirements/**"
- "requirements_cuda.txt"
- "CMakeLists.txt"
- "setup.py"
push:
branches:
- main
paths:
- ".github/workflows/unit_test.yml"
- "cmake/**"
- "src/**"
- "tests/**"
- "3rdparty/**"
- "lmdeploy/**"
- "requirements/**"
- "requirements_cuda.txt"
- "CMakeLists.txt"
- "setup.py"
tags:
- "v*.*.*"
jobs:
unit_test:
runs-on: [self-hosted, linux-a100-s2]
timeout-minutes: 4320 # 72hours
container:
image: openmmlab/lmdeploy:dev-cu12.8
options: "--gpus=all --ipc=host --user root -e PIP_CACHE_DIR=/root/.cache/pip -e CUDA_VISIBLE_DEVICES=2,3 -e HF_HOME=/root/.cache/huggingface --pull never"
volumes:
- /nvme/share_data/github-actions/pip-cache:/root/.cache/pip
- /nvme/share_data/github-actions/hf_home:/root/.cache/huggingface
- /nvme/share_data/github-actions/packages:/root/packages
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
steps:
- name: Clone repository
uses: actions/checkout@v5
- name: Install lmdeploy
run: |
python3 -m pip install -r requirements/test.txt
python3 -m pip install -e .
- name: Check env
run: |
python3 -m pip list
lmdeploy check_env
- name: Test lmdeploy python UT
run: |
coverage run --branch --source lmdeploy -m pytest -rsE tests
coverage xml
coverage report -m
- name: Clear workfile
if: always()
run: |
export workdir=$(pwd)
cd ..
rm -rf $workdir
mkdir $workdir
chmod -R 777 $workdir