-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (37 loc) · 1006 Bytes
/
unittest.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
name: CI Pipeline
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v3
# 安裝系統依賴,確保 OpenCV 可以正確運行
- name: Install OpenCV dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgl1-mesa-glx libglib2.0-0
# 設置 Python 環境(這裡以 Python 為例)
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.10
# 確認 Python 版本
- name: Check Python version
run: python --version
# 安裝 Python 依賴
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# 執行測試
- name: Run tests
run: |
python -m unittest discover