-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (65 loc) · 1.89 KB
/
test.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Run Tests
on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]
schedule:
- cron: "0 7 * * 1"
workflow_dispatch:
jobs:
lint:
name: Linting (pre-commit and mypy)
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v4
with:
# Get history and tags for SCM versioning to work
fetch-depth: 0
- name: Install the latest version of uv with cache enabled
uses: astral-sh/setup-uv@v3
with:
version: "latest"
enable-cache: true
cache-dependency-glob: ""
- name: Run linters with tox
run: uvx --python 3.9 --with tox-uv tox -e linters
tests:
name: Test it!
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.9, "3.13"]
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout the repo
uses: actions/checkout@v4
with:
# Get history and tags for SCM versioning to work
fetch-depth: 0
- name: Install the latest version of uv with cache enabled
uses: astral-sh/setup-uv@v3
with:
version: "latest"
enable-cache: true
cache-dependency-glob: ""
- name: Test with tox
run: uvx --python ${{ matrix.python-version }} --with tox-uv --with tox-gh-actions tox
check-pypi:
name: Long description check for PyPI
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v4
with:
# Get history and tags for SCM versioning to work
fetch-depth: 0
- name: Install the latest version of uv with cache enabled
uses: astral-sh/setup-uv@v3
with:
version: "latest"
enable-cache: true
cache-dependency-glob: ""
- name: Testing with tox and sphinx (to have rst2html.py utility available)
run: uvx --with tox-uv --with sphinx tox -e pypi