1
- name : test
2
-
1
+ name : main
3
2
on : [push, pull_request, release]
4
-
5
3
jobs :
6
- build :
7
-
4
+ test :
5
+ runs-on : ${{ matrix.os }}
8
6
strategy :
9
7
matrix :
10
- python-version : ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
11
- runs-on : ubuntu-latest
8
+ os :
9
+ - " ubuntu-latest"
10
+ - " macos-latest"
11
+ # - "windows-latest"
12
+ python-version :
13
+ - " 3.9"
14
+ - " 3.10"
15
+ - " 3.11"
16
+ - " 3.12"
17
+ - " 3.13"
12
18
steps :
13
- - uses : actions/checkout@v3
19
+ - uses : actions/checkout@v4
14
20
- name : Set up Python ${{ matrix.python-version }}
15
- uses : actions /setup-python@v4
21
+ uses : astral-sh /setup-uv@v5
16
22
with :
23
+ version : " 0.6.9"
17
24
python-version : ${{ matrix.python-version }}
18
- - name : Install dependencies
19
- run : |
20
- python -m pip install --upgrade pip
21
- sudo apt-get install -y graphviz
22
- pip install tox "poetry>=1.4" coveralls
23
- - name : TOX
24
- run : tox
25
+ enable-cache : true
26
+ cache-dependency-glob : " uv.lock"
27
+ - name : Install graphviz
28
+ run : sudo apt install -y graphviz || true
29
+ - name : Run all
30
+ run : make all
25
31
- name : Upload coverage data to coveralls.io
26
- run : coveralls --service=github
32
+ run : uv run --frozen -- coveralls --service=github
27
33
env :
28
34
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
29
35
COVERALLS_FLAG_NAME : ${{ matrix.test-name }}
30
36
COVERALLS_PARALLEL : true
31
37
32
38
coveralls :
33
39
name : Indicate completion to coveralls.io
34
- needs : build
40
+ needs : test
35
41
runs-on : ubuntu-latest
36
- container : python:3-slim
37
42
steps :
38
- - name : Finished
39
- run : |
40
- pip3 install --upgrade coveralls
41
- coveralls --service=github --finish
42
- env :
43
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
43
+ - uses : actions/checkout@v4
44
+ - name : Set up Python ${{ matrix.python-version }}
45
+ uses : astral-sh/setup-uv@v5
46
+ with :
47
+ version : " 0.6.9"
48
+ python-version : ${{ matrix.python-version }}
49
+ enable-cache : true
50
+ cache-dependency-glob : " uv.lock"
51
+ - name : Upload coverage data to coveralls.io
52
+ run : uv run --frozen -- coveralls --service=github --finish
53
+ env :
54
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
44
55
45
56
publish :
46
57
if : github.event_name == 'push' && github.ref_type == 'tag'
47
58
needs : coveralls
59
+ name : upload release to PyPI
48
60
runs-on : ubuntu-latest
61
+ permissions :
62
+ id-token : write
49
63
steps :
50
- - uses : actions/checkout@v3
51
- - name : Build and publish to pypi
52
-
53
- with :
54
- pypi_token : ${{ secrets.PYPI_TOKEN }}
64
+ - uses : actions/checkout@v4
65
+ - uses : pdm-project/setup-pdm@v4
66
+ - name : Publish package distributions to PyPI
67
+ run : pdm publish
0 commit comments