9
9
env :
10
10
PY_COLORS : " 1"
11
11
12
+ permissions :
13
+ contents : read
14
+
12
15
jobs :
13
16
test :
14
17
runs-on : ${{ matrix.os }}
29
32
]
30
33
fail-fast : false
31
34
steps :
32
- - uses : actions/checkout@v4
35
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
36
+ with :
37
+ fetch-depth : 0
38
+ persist-credentials : false
33
39
- name : Install uv
34
- uses : astral-sh/setup-uv@v6
40
+ uses : astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # 6.4.3
35
41
- name : Install tox
36
42
run : uv tool install tox --with tox-uv
37
43
- name : Setup SocketCAN
@@ -45,10 +51,10 @@ jobs:
45
51
tox -e ${{ matrix.env }}
46
52
env :
47
53
# SocketCAN tests currently fail with PyPy because it does not support raw CAN sockets
48
- # See: https://foss.heptapod.net /pypy/pypy/-/ issues/3809
54
+ # See: https://github.com /pypy/pypy/issues/3808
49
55
TEST_SOCKETCAN : " ${{ matrix.os == 'ubuntu-latest' && ! startsWith(matrix.env, 'pypy' ) }}"
50
56
- name : Coveralls Parallel
51
- uses : coverallsapp/github-action@v2
57
+ uses : coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # 2.3.6
52
58
with :
53
59
github-token : ${{ secrets.github_token }}
54
60
flag-name : Unittests-${{ matrix.os }}-${{ matrix.env }}
@@ -59,19 +65,25 @@ jobs:
59
65
needs : test
60
66
runs-on : ubuntu-latest
61
67
steps :
62
- - uses : actions/checkout@v4
68
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
69
+ with :
70
+ fetch-depth : 0
71
+ persist-credentials : false
63
72
- name : Coveralls Finished
64
- uses : coverallsapp/github-action@v2
73
+ uses : coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # 2.3.6
65
74
with :
66
75
github-token : ${{ secrets.github_token }}
67
76
parallel-finished : true
68
77
69
78
static-code-analysis :
70
79
runs-on : ubuntu-latest
71
80
steps :
72
- - uses : actions/checkout@v4
81
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
82
+ with :
83
+ fetch-depth : 0
84
+ persist-credentials : false
73
85
- name : Install uv
74
- uses : astral-sh/setup-uv@v6
86
+ uses : astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # 6.4.3
75
87
- name : Install tox
76
88
run : uv tool install tox --with tox-uv
77
89
- name : Run linters
84
96
docs :
85
97
runs-on : ubuntu-latest
86
98
steps :
87
- - uses : actions/checkout@v4
99
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
100
+ with :
101
+ fetch-depth : 0
102
+ persist-credentials : false
88
103
- name : Install uv
89
- uses : astral-sh/setup-uv@v6
104
+ uses : astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # 6.4.3
90
105
- name : Install tox
91
106
run : uv tool install tox --with tox-uv
92
107
- name : Build documentation
@@ -97,17 +112,18 @@ jobs:
97
112
name : Packaging
98
113
runs-on : ubuntu-latest
99
114
steps :
100
- - uses : actions/checkout@v4
115
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
101
116
with :
102
- fetch-depth : 0 # fetch tags for setuptools-scm
117
+ fetch-depth : 0
118
+ persist-credentials : false
103
119
- name : Install uv
104
- uses : astral-sh/setup-uv@v6
120
+ uses : astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # 6.4.3
105
121
- name : Build wheel and sdist
106
- run : uvx --from build pyproject-build --installer uv
122
+ run : uv build
107
123
- name : Check build artifacts
108
124
run : uvx twine check --strict dist/*
109
125
- name : Save artifacts
110
- uses : actions/upload-artifact@v4
126
+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
111
127
with :
112
128
name : release
113
129
path : ./dist
@@ -123,10 +139,15 @@ jobs:
123
139
# upload to PyPI only on release
124
140
if : github.event.release && github.event.action == 'published'
125
141
steps :
126
- - uses : actions/download-artifact@v4
142
+ - uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # 4.3.0
127
143
with :
128
144
path : dist
129
145
merge-multiple : true
130
146
147
+ - name : Generate artifact attestation
148
+ uses : actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # 2.4.0
149
+ with :
150
+ subject-path : ' dist/*'
151
+
131
152
- name : Publish release distributions to PyPI
132
- uses : pypa/gh-action-pypi-publish@release/v1
153
+ uses : pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # 1.12.4
0 commit comments