-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (44 loc) · 1.15 KB
/
Copy pathpython-ci.yml
File metadata and controls
55 lines (44 loc) · 1.15 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
name: Python CI
on:
push:
paths:
- "python/**"
- ".github/workflows/python-ci.yml"
pull_request:
paths:
- "python/**"
- ".github/workflows/python-ci.yml"
jobs:
python-checks:
name: Install and import-check Python CV worker
runs-on: ubuntu-latest
defaults:
run:
working-directory: python
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
cache-dependency-path: python/requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Check Python imports
run: |
python - <<'PY'
import cv2
import numpy
import onnxruntime
import fastapi
import uvicorn
import websockets
print("Python CV dependencies imported successfully")
PY
- name: Check project modules compile
run: |
python -m compileall .