Skip to content

Commit c9a99f4

Browse files
authored
Fix zizmor findings on CI (#148)
And replace pre-commit/action with faster tox-dev/action-pre-commit-uv.
2 parents 8334187 + 0faaee0 commit c9a99f4

File tree

5 files changed

+13
-26
lines changed

5 files changed

+13
-26
lines changed

.github/workflows/deploy.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ on:
1111
- published
1212
workflow_dispatch:
1313

14-
permissions:
15-
contents: read
16-
1714
env:
1815
FORCE_COLOR: 1
1916

@@ -27,6 +24,7 @@ jobs:
2724
- uses: actions/checkout@v4
2825
with:
2926
fetch-depth: 0
27+
persist-credentials: false
3028

3129
- uses: hynek/build-and-inspect-python-package@v2
3230

.github/workflows/labels.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: Sync labels
22

3-
permissions:
4-
pull-requests: write
5-
63
on:
74
push:
85
branches:
@@ -13,9 +10,13 @@ on:
1310

1411
jobs:
1512
sync:
13+
permissions:
14+
pull-requests: write
1615
runs-on: ubuntu-latest
1716
steps:
1817
- uses: actions/checkout@v4
18+
with:
19+
persist-credentials: false
1920
- uses: micnncim/action-label-syncer@v1
2021
with:
2122
prune: false

.github/workflows/lint.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,16 @@ on: [push, pull_request, workflow_dispatch]
44

55
env:
66
FORCE_COLOR: 1
7-
PIP_DISABLE_PIP_VERSION_CHECK: 1
8-
9-
permissions:
10-
contents: read
117

128
jobs:
139
lint:
1410
runs-on: ubuntu-latest
1511

1612
steps:
1713
- uses: actions/checkout@v4
14+
with:
15+
persist-credentials: false
1816
- uses: actions/setup-python@v5
1917
with:
2018
python-version: "3.x"
21-
cache: pip
22-
- uses: pre-commit/[email protected]
19+
- uses: tox-dev/action-pre-commit-uv@v1

.github/workflows/release-drafter.yml

-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ on:
1414
# types: [opened, reopened, synchronize]
1515
workflow_dispatch:
1616

17-
permissions:
18-
contents: read
19-
2017
jobs:
2118
update_release_draft:
2219
if: github.repository_owner == 'hugovk'

.github/workflows/test.yml

+5-11
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@ name: Test
22

33
on: [push, pull_request, workflow_dispatch]
44

5-
permissions:
6-
contents: read
7-
85
env:
96
FORCE_COLOR: 1
10-
PIP_DISABLE_PIP_VERSION_CHECK: 1
117

128
jobs:
139
test:
@@ -20,6 +16,8 @@ jobs:
2016

2117
steps:
2218
- uses: actions/checkout@v4
19+
with:
20+
persist-credentials: false
2321

2422
- name: Set up Python ${{ matrix.python-version }}
2523
uses: actions/setup-python@v5
@@ -30,18 +28,14 @@ jobs:
3028
- name: Install uv
3129
uses: hynek/setup-cached-uv@v2
3230

33-
- name: Install dependencies
34-
run: |
35-
uv pip install --system -U tox-uv
36-
3731
- name: Tox tests
3832
run: |
39-
tox -e py
33+
uvx --with tox-uv tox -e py
4034
4135
- name: Test CLI
4236
if: matrix.os == 'ubuntu-latest'
4337
run: |
44-
tox -e cli
38+
uvx --with tox-uv tox -e cli
4539
4640
- name: Test emojis.json is up-to-date
4741
run: |
@@ -56,7 +50,7 @@ jobs:
5650
uses: codecov/[email protected]
5751
with:
5852
flags: ${{ matrix.os }}
59-
name: "${{ matrix.os }} Python ${{ matrix.python-version }}"
53+
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
6054

6155
success:
6256
needs: test

0 commit comments

Comments
 (0)