ci: 添加action自动测试
This commit is contained in:
parent
3d961aa2d7
commit
9e5640ad80
26
.github/workflows/detection-test.yml
vendored
Normal file
26
.github/workflows/detection-test.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
name: Detection test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python 3.8
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.8
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pytest
|
||||
# 如果你的测试需要其他依赖,可以在这里添加pip install命令
|
||||
- name: Run tests
|
||||
run: |
|
||||
python -m unittest discover -s tests
|
Loading…
x
Reference in New Issue
Block a user