11
11
12
12
jobs :
13
13
lint :
14
- name : Linting (pre-commit)
14
+ name : Linting (pre-commit and mypy )
15
15
runs-on : ubuntu-latest
16
16
steps :
17
17
- name : Checkout the repo
18
- uses : actions/checkout@v2
19
- - name : Set up Python 3.9
20
- uses : actions/setup-python@v2
18
+ uses : actions/checkout@v4
21
19
with :
22
- python-version : " 3.9"
23
- - name : Run pre-commit action
24
- uses : pre-commit/action@v2.0.0
20
+ # Get history and tags for SCM versioning to work
21
+ fetch-depth : 0
22
+ - name : Install the latest version of uv with cache enabled
23
+ uses : astral-sh/setup-uv@v3
24
+ with :
25
+ version : " latest"
26
+ enable-cache : true
27
+ cache-dependency-glob : " "
28
+ - name : Run linters with tox
29
+ run : uvx --python 3.9 --with tox-uv tox -e linters
25
30
26
31
tests :
27
32
name : Test it!
@@ -32,61 +37,33 @@ jobs:
32
37
os : [ubuntu-latest, windows-latest]
33
38
steps :
34
39
- name : Checkout the repo
35
- uses : actions/checkout@v2
36
- - name : Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
37
- uses : actions/setup-python@v2
40
+ uses : actions/checkout@v4
38
41
with :
39
- python-version : ${{ matrix.python-version }}
40
- - name : Update pip
41
- run : python -m pip install --upgrade pip
42
- - name : Get pip cache dir
43
- id : pip-cache
44
- run : |
45
- echo "::set-output name=dir::$(pip cache dir)"
46
- - name : Get current week number
47
- id : get-week
48
- shell : bash
49
- run : echo "::set-output name=week::$(date +'%V')"
50
- - name : Pip cache
51
- uses : actions/cache@v2
42
+ # Get history and tags for SCM versioning to work
43
+ fetch-depth : 0
44
+ - name : Install the latest version of uv with cache enabled
45
+ uses : astral-sh/setup-uv@v3
52
46
with :
53
- path : ${{ steps.pip-cache.outputs.dir }}
54
- key : ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ steps.get-week.outputs.week }}-${{ hashFiles('setup.py') }}
55
- - name : Enable long paths on Windows and Git
56
- if : runner.os == 'Windows'
57
- run : git config --global core.longpaths true
58
- - name : Install other deps
59
- run : python -m pip install .[dev]
60
- - name : Test with pytest
61
- run : pytest --show-capture=no --cov --cov-fail-under=50
47
+ version : " latest"
48
+ enable-cache : true
49
+ cache-dependency-glob : " "
50
+ - name : Test with tox
51
+ run : uvx --python ${{ matrix.python-version }} --with tox-uv --with tox-gh-actions tox
62
52
63
53
check-pypi :
64
54
name : Long description check for PyPI
65
55
runs-on : ubuntu-latest
66
56
steps :
67
57
- name : Checkout the repo
68
- uses : actions/checkout@v2
69
- - name : Set up Python 3.9
70
- uses : actions/setup-python@v2
58
+ uses : actions/checkout@v4
71
59
with :
72
- python-version : " 3.9"
73
- - name : Update pip
74
- run : python -m pip install --upgrade pip
75
- - name : Get pip cache dir
76
- id : pip-cache
77
- run : |
78
- echo "::set-output name=dir::$(pip cache dir)"
79
- - name : Get current week number
80
- id : get-week
81
- shell : bash
82
- run : echo "::set-output name=week::$(date +'%V')"
83
- - name : Pip cache
84
- uses : actions/cache@v2
60
+ # Get history and tags for SCM versioning to work
61
+ fetch-depth : 0
62
+ - name : Install the latest version of uv with cache enabled
63
+ uses : astral-sh/setup-uv@v3
85
64
with :
86
- path : ${{ steps.pip-cache.outputs.dir }}
87
- key : ${{ runner.os }}-pip-${{ steps.get-week.outputs.week }}-${{ hashFiles('setup.py') }}
88
- - name : Install tox and sphinx (to have rst2html.py utility available)
89
- run : |
90
- python -m pip install tox sphinx
91
- - name : Testing with tox
92
- run : python -m tox -e pypi
65
+ version : " latest"
66
+ enable-cache : true
67
+ cache-dependency-glob : " "
68
+ - name : Testing with tox and sphinx (to have rst2html.py utility available)
69
+ run : uvx --with tox-uv --with sphinx tox -e pypi
0 commit comments