@@ -5,68 +5,62 @@ on: [push, pull_request]
5
5
env :
6
6
PYTEST_ADDOPTS : " --color=yes"
7
7
8
- jobs :
8
+ permissions :
9
+ contents : read
9
10
11
+ jobs :
10
12
test :
11
- name : Test - ${{ matrix.python-version }}
13
+ name : Test - Python ${{ matrix.python-version }}
12
14
runs-on : ubuntu-latest
13
15
strategy :
14
16
matrix :
15
- python-version : ["3.8 ", "3.9 ", "3.10 ", "3.11 "]
17
+ python-version : ["3.9 ", "3.10 ", "3.11 ", "3.12 "]
16
18
17
19
steps :
18
- - uses : actions/checkout@v3
19
-
20
- - name : Install Poetry
21
- run : pipx install poetry
22
-
23
- - name : Set up Python ${{ matrix.python-version }}
24
- uses : actions/setup-python@v4
20
+ - uses : actions/checkout@v4
21
+ with :
22
+ persist-credentials : false
23
+ - name : Install pdm
24
+ uses : pdm-project/setup-pdm@v4
25
25
with :
26
26
python-version : ${{ matrix.python-version }}
27
- cache : " poetry"
28
- cache-dependency-path : " pyproject.toml"
27
+ cache : true
28
+ cache-dependency-path : ./pyproject.toml
29
+ version : " 2.20.0"
29
30
30
31
- name : Install dependencies
31
32
run : |
32
- poetry env use "${{ matrix.python-version }}"
33
- poetry run pip install --upgrade libsass
34
- poetry install --no-interaction
33
+ pdm install
35
34
36
35
- name : Run tests
37
- run : poetry run invoke tests
38
-
36
+ run : pdm run invoke tests
39
37
40
38
lint :
41
39
name : Lint
42
40
runs-on : ubuntu-latest
43
41
44
42
steps :
45
- - uses : actions/checkout@v3
43
+ - uses : actions/checkout@v4
44
+ with :
45
+ persist-credentials : false
46
46
47
47
- name : Validate links in Markdown files
48
48
uses : JustinBeckwith/linkinator-action@v1
49
49
with :
50
50
retry : true
51
51
52
- - name : Install Poetry
53
- run : pipx install poetry
54
-
55
- - name : Set up Python
56
- uses : actions/setup-python@v4
52
+ - name : Install pdm
53
+ uses : pdm-project/setup-pdm@v4
57
54
with :
58
- python-version : " 3.9"
59
- cache : " poetry"
60
- cache-dependency-path : " pyproject.toml"
55
+ python-version : " 3.10"
56
+ version : " 2.20.0"
61
57
62
58
- name : Install dependencies
63
59
run : |
64
- poetry env use "3.9"
65
- poetry install --no-interaction
60
+ pdm install
66
61
67
62
- name : Run linters
68
- run : poetry run invoke lint --diff
69
-
63
+ run : pdm run invoke lint --diff
70
64
71
65
deploy :
72
66
name : Deploy
@@ -80,31 +74,25 @@ jobs:
80
74
id-token : write
81
75
82
76
steps :
83
- - uses : actions/checkout@v3
84
- with :
85
- token : ${{ secrets.GH_TOKEN }}
77
+ - uses : actions/checkout@v4
86
78
87
- - name : Set up Python
88
- uses : actions/setup-python@v4
89
- with :
90
- python-version : " 3.9"
79
+ - name : Install uv
80
+ uses : astral-sh/setup-uv@v3
91
81
92
82
- name : Check release
93
83
id : check_release
94
84
run : |
95
- python -m pip install --upgrade pip
96
- python -m pip install autopub[github]
97
- autopub check
85
+ uvx --with 'autopub[github]' autopub check
98
86
99
87
- name : Publish
100
88
if : ${{ steps.check_release.outputs.autopub_release=='true' }}
101
89
env :
102
- GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
90
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
103
91
run : |
104
- autopub prepare
105
- autopub commit
106
- autopub build
107
- autopub githubrelease
92
+ uvx --with 'autopub[github]' autopub prepare
93
+ uvx --with 'autopub[github]' autopub commit
94
+ uvx --with 'autopub[github]' autopub build
95
+ uvx --with 'autopub[github]' autopub githubrelease
108
96
109
97
- name : Upload package to PyPI
110
98
if : ${{ steps.check_release.outputs.autopub_release=='true' }}
0 commit comments