-
Notifications
You must be signed in to change notification settings - Fork 0
118 lines (95 loc) · 3.08 KB
/
Copy pathtests.yml
File metadata and controls
118 lines (95 loc) · 3.08 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: Tests
on:
workflow_dispatch:
push:
branches: ["master"]
pull_request:
branches: ["master"]
permissions:
contents: read
env:
PYTHONUTF8: "1"
PYTHONIOENCODING: "utf-8"
concurrency:
group: tests-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
core:
name: ${{ matrix.os }} / Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
version: "0.11.26"
enable-cache: true
cache-dependency-glob: uv.lock
- name: Install Python
run: uv python install ${{ matrix.python-version }}
- name: Sync locked environment
run: uv sync --locked --python ${{ matrix.python-version }}
- name: Check CLI imports
run: |
uv run --locked --python ${{ matrix.python-version }} python -m biliscriptor --help
uv run --locked --python ${{ matrix.python-version }} biliscriptor --help
- name: Run pytest
run: uv run --locked --python ${{ matrix.python-version }} pytest
- name: Check installed dependencies
run: uv pip check
paddleocr:
name: PaddleOCR smoke / Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
version: "0.11.26"
enable-cache: true
cache-dependency-glob: uv.lock
- name: Install Python
run: uv python install ${{ matrix.python-version }}
- name: Sync PaddleOCR optional dependencies
run: uv sync --locked --no-dev --extra ocr-paddle --python ${{ matrix.python-version }}
- name: Smoke test PaddleOCR imports
run: |
uv run --locked --no-dev --extra ocr-paddle --python ${{ matrix.python-version }} python -c "import paddle; import paddleocr"
uv pip check
package:
name: Build package
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
version: "0.11.26"
enable-cache: true
cache-dependency-glob: uv.lock
- name: Build source and wheel distributions
run: |
uv python install 3.13
uv build
- name: Smoke test wheel install
run: |
uv python install 3.13
uv venv --python 3.13 .venv-wheel
uv pip install --python .venv-wheel/bin/python dist/*.whl
.venv-wheel/bin/python -m biliscriptor --help
uv pip check --python .venv-wheel/bin/python