Skip to content

Commit

Permalink
Fix zizmor findings on CI (#148)
Browse files Browse the repository at this point in the history
And replace pre-commit/action with faster tox-dev/action-pre-commit-uv.
  • Loading branch information
hugovk authored Dec 7, 2024
2 parents 8334187 + 0faaee0 commit c9a99f4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 26 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ on:
- published
workflow_dispatch:

permissions:
contents: read

env:
FORCE_COLOR: 1

Expand All @@ -27,6 +24,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

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

Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: Sync labels

permissions:
pull-requests: write

on:
push:
branches:
Expand All @@ -13,9 +10,13 @@ on:

jobs:
sync:
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: micnncim/action-label-syncer@v1
with:
prune: false
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,16 @@ on: [push, pull_request, workflow_dispatch]

env:
FORCE_COLOR: 1
PIP_DISABLE_PIP_VERSION_CHECK: 1

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: pip
- uses: pre-commit/action@v3.0.1
- uses: tox-dev/action-pre-commit-uv@v1
3 changes: 0 additions & 3 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ on:
# types: [opened, reopened, synchronize]
workflow_dispatch:

permissions:
contents: read

jobs:
update_release_draft:
if: github.repository_owner == 'hugovk'
Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@ name: Test

on: [push, pull_request, workflow_dispatch]

permissions:
contents: read

env:
FORCE_COLOR: 1
PIP_DISABLE_PIP_VERSION_CHECK: 1

jobs:
test:
Expand All @@ -20,6 +16,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

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

- name: Install dependencies
run: |
uv pip install --system -U tox-uv
- name: Tox tests
run: |
tox -e py
uvx --with tox-uv tox -e py
- name: Test CLI
if: matrix.os == 'ubuntu-latest'
run: |
tox -e cli
uvx --with tox-uv tox -e cli
- name: Test emojis.json is up-to-date
run: |
Expand All @@ -56,7 +50,7 @@ jobs:
uses: codecov/codecov-action@v5.0.7
with:
flags: ${{ matrix.os }}
name: "${{ matrix.os }} Python ${{ matrix.python-version }}"
name: ${{ matrix.os }} Python ${{ matrix.python-version }}

success:
needs: test
Expand Down

0 comments on commit c9a99f4

Please sign in to comment.