Skip to content

Commit df8819f

Browse files
authored
Fix zizmor warnings and update dependabot.yml (#1971)
* fix broken url * fix zizmor warnings * update dependabot.yml
1 parent 380a423 commit df8819f

File tree

3 files changed

+56
-20
lines changed

3 files changed

+56
-20
lines changed

.github/dependabot.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@
66
version: 2
77
updates:
88
- package-ecosystem: "uv"
9+
# Enable version updates for development dependencies
910
directory: "/"
1011
schedule:
11-
interval: "weekly"
12+
interval: "monthly"
13+
groups:
14+
dev-deps:
15+
patterns:
16+
- "*"
17+
18+
- package-ecosystem: "github-actions"
19+
# Enable version updates for GitHub Actions
20+
directory: "/"
21+
schedule:
22+
interval: "monthly"
23+
groups:
24+
github-actions:
25+
patterns:
26+
- "*"

.github/workflows/ci.yml

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
env:
1010
PY_COLORS: "1"
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
test:
1417
runs-on: ${{ matrix.os }}
@@ -29,9 +32,12 @@ jobs:
2932
]
3033
fail-fast: false
3134
steps:
32-
- uses: actions/checkout@v4
35+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
36+
with:
37+
fetch-depth: 0
38+
persist-credentials: false
3339
- name: Install uv
34-
uses: astral-sh/setup-uv@v6
40+
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # 6.4.3
3541
- name: Install tox
3642
run: uv tool install tox --with tox-uv
3743
- name: Setup SocketCAN
@@ -45,10 +51,10 @@ jobs:
4551
tox -e ${{ matrix.env }}
4652
env:
4753
# 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
4955
TEST_SOCKETCAN: "${{ matrix.os == 'ubuntu-latest' && ! startsWith(matrix.env, 'pypy' ) }}"
5056
- name: Coveralls Parallel
51-
uses: coverallsapp/github-action@v2
57+
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # 2.3.6
5258
with:
5359
github-token: ${{ secrets.github_token }}
5460
flag-name: Unittests-${{ matrix.os }}-${{ matrix.env }}
@@ -59,19 +65,25 @@ jobs:
5965
needs: test
6066
runs-on: ubuntu-latest
6167
steps:
62-
- uses: actions/checkout@v4
68+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
69+
with:
70+
fetch-depth: 0
71+
persist-credentials: false
6372
- name: Coveralls Finished
64-
uses: coverallsapp/github-action@v2
73+
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # 2.3.6
6574
with:
6675
github-token: ${{ secrets.github_token }}
6776
parallel-finished: true
6877

6978
static-code-analysis:
7079
runs-on: ubuntu-latest
7180
steps:
72-
- uses: actions/checkout@v4
81+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
82+
with:
83+
fetch-depth: 0
84+
persist-credentials: false
7385
- name: Install uv
74-
uses: astral-sh/setup-uv@v6
86+
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # 6.4.3
7587
- name: Install tox
7688
run: uv tool install tox --with tox-uv
7789
- name: Run linters
@@ -84,9 +96,12 @@ jobs:
8496
docs:
8597
runs-on: ubuntu-latest
8698
steps:
87-
- uses: actions/checkout@v4
99+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
100+
with:
101+
fetch-depth: 0
102+
persist-credentials: false
88103
- name: Install uv
89-
uses: astral-sh/setup-uv@v6
104+
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # 6.4.3
90105
- name: Install tox
91106
run: uv tool install tox --with tox-uv
92107
- name: Build documentation
@@ -97,17 +112,18 @@ jobs:
97112
name: Packaging
98113
runs-on: ubuntu-latest
99114
steps:
100-
- uses: actions/checkout@v4
115+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
101116
with:
102-
fetch-depth: 0 # fetch tags for setuptools-scm
117+
fetch-depth: 0
118+
persist-credentials: false
103119
- name: Install uv
104-
uses: astral-sh/setup-uv@v6
120+
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # 6.4.3
105121
- name: Build wheel and sdist
106-
run: uvx --from build pyproject-build --installer uv
122+
run: uv build
107123
- name: Check build artifacts
108124
run: uvx twine check --strict dist/*
109125
- name: Save artifacts
110-
uses: actions/upload-artifact@v4
126+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
111127
with:
112128
name: release
113129
path: ./dist
@@ -123,10 +139,15 @@ jobs:
123139
# upload to PyPI only on release
124140
if: github.event.release && github.event.action == 'published'
125141
steps:
126-
- uses: actions/download-artifact@v4
142+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # 4.3.0
127143
with:
128144
path: dist
129145
merge-multiple: true
130146

147+
- name: Generate artifact attestation
148+
uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # 2.4.0
149+
with:
150+
subject-path: 'dist/*'
151+
131152
- 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

test/test_socketcan.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ def test_pypy_socketcan_support(self):
377377
378378
This test shall document raw CAN socket support under PyPy. Once this test fails, it is likely that PyPy
379379
either implemented raw CAN socket support or at least changed the error that is thrown.
380-
https://foss.heptapod.net/pypy/pypy/-/issues/3809
380+
https://github.com/pypy/pypy/issues/3808
381381
https://github.com/hardbyte/python-can/issues/1479
382382
"""
383383
try:
@@ -386,7 +386,7 @@ def test_pypy_socketcan_support(self):
386386
if "unknown address family" not in str(e):
387387
warnings.warn(
388388
"Please check if PyPy has implemented raw CAN socket support! "
389-
"See: https://foss.heptapod.net/pypy/pypy/-/issues/3809"
389+
"See: https://github.com/pypy/pypy/issues/3808"
390390
)
391391

392392

0 commit comments

Comments
 (0)