forked from hect0x7/JMComic-Crawler-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.22 KB
/
test_api.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
46
47
48
name: Run Test (API)
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
push:
branches: [ "dev" ]
paths:
- 'src/**/*.py'
- 'tests/**/*.py'
- '.github/workflows/test_api.yml'
- 'assets/option/option_test_api.yml'
jobs:
test: # This code is based on https://github.com/gaogaotiantian/viztracer/blob/master/.github/workflows/python-package.yml
strategy:
matrix:
python-version: ['3.7', '3.8', '3.11', '3.12']
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
timeout-minutes: 5
env:
# 配置文件路径
JM_OPTION_PATH_TEST: ./assets/option/option_test_api.yml
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Install local
run: |
pip install -e ./
- name: Run Test
run: |
cd ./tests/
python -m unittest