Skip to content

Commit bee023e

Browse files
committed
chore: obey zizmor again
1 parent 6cef1cd commit bee023e

11 files changed

Lines changed: 76 additions & 21 deletions

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ updates:
1010
actions:
1111
patterns:
1212
- "*"
13+
cooldown:
14+
default-days: 7
1315
- package-ecosystem: "github-actions"
1416
directory: "/"
1517
target-branch: "support/v2"
@@ -19,3 +21,5 @@ updates:
1921
actions:
2022
patterns:
2123
- "*"
24+
cooldown:
25+
default-days: 7

.github/workflows/check_changelogs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
permissions:
88
contents: read
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
1014
jobs:
1115
check-changelogs:
1216
name: Check changelog entries

.github/workflows/codspeed.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
permissions:
1111
contents: read
1212

13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
1317
jobs:
1418
benchmarks:
1519
name: Run benchmarks

.github/workflows/gpu_test.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,16 @@ jobs:
6262
with:
6363
version: '1.16.5'
6464
- name: Set Up Hatch Env
65+
env:
66+
HATCH_ENV: gputest.py${{ matrix.python-version }}
6567
run: |
66-
hatch env create gputest.py${{ matrix.python-version }}
67-
hatch env run -e gputest.py${{ matrix.python-version }} list-env
68+
hatch env create "$HATCH_ENV"
69+
hatch env run -e "$HATCH_ENV" list-env
6870
- name: Run Tests
71+
env:
72+
HATCH_ENV: gputest.py${{ matrix.python-version }}
6973
run: |
70-
hatch env run --env gputest.py${{ matrix.python-version }} run-coverage
74+
hatch env run --env "$HATCH_ENV" run-coverage
7175
7276
- name: Upload coverage
7377
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1

.github/workflows/hypothesis.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
permissions:
1313
contents: read
1414

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
1519
env:
1620
FORCE_COLOR: 3
1721

@@ -34,8 +38,10 @@ jobs:
3438
with:
3539
persist-credentials: false
3640
- name: Set HYPOTHESIS_PROFILE based on trigger
41+
env:
42+
EVENT_NAME: ${{ github.event_name }}
3743
run: |
38-
if [[ "${{ github.event_name }}" == "schedule" || "${{ github.event_name }}" == "workflow_dispatch" ]]; then
44+
if [[ "$EVENT_NAME" == "schedule" || "$EVENT_NAME" == "workflow_dispatch" ]]; then
3945
echo "HYPOTHESIS_PROFILE=nightly" >> $GITHUB_ENV
4046
else
4147
echo "HYPOTHESIS_PROFILE=ci" >> $GITHUB_ENV
@@ -50,9 +56,11 @@ jobs:
5056
with:
5157
version: '1.16.5'
5258
- name: Set Up Hatch Env
59+
env:
60+
HATCH_ENV: test.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
5361
run: |
54-
hatch env create test.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
55-
hatch env run -e test.py${{ matrix.python-version }}-${{ matrix.dependency-set }} list-env
62+
hatch env create "$HATCH_ENV"
63+
hatch env run -e "$HATCH_ENV" list-env
5664
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
5765
- name: Restore cached hypothesis directory
5866
id: restore-hypothesis-cache
@@ -66,9 +74,11 @@ jobs:
6674
- name: Run slow Hypothesis tests
6775
if: success()
6876
id: status
77+
env:
78+
HATCH_ENV: test.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
6979
run: |
7080
echo "Using Hypothesis profile: $HYPOTHESIS_PROFILE"
71-
hatch env run --env test.py${{ matrix.python-version }}-${{ matrix.dependency-set }} run-hypothesis
81+
hatch env run --env "$HATCH_ENV" run-hypothesis
7282
7383
# explicitly save the cache so it gets updated, also do this even if it fails.
7484
- name: Save cached hypothesis directory

.github/workflows/issue-metrics.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,17 @@ on:
77
permissions:
88
contents: read
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
1014
jobs:
1115
build:
1216
name: issue metrics
1317
runs-on: ubuntu-latest
1418
permissions:
15-
issues: write
16-
pull-requests: read
19+
issues: write # Required to create the metrics report issue
20+
pull-requests: read # Required to read PR metrics
1721
steps:
1822
- name: Get dates for last month
1923
shell: bash

.github/workflows/needs_release_notes.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,19 @@ on:
66
pull_request_target: # zizmor: ignore[dangerous-triggers]
77
types: [opened, reopened, synchronize]
88

9+
permissions: {}
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
13+
cancel-in-progress: true
14+
915
jobs:
1016
labeler:
17+
name: Label pull request
1118
if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.user.login != 'pre-commit-ci[bot]' }}
1219
permissions:
13-
contents: read
14-
pull-requests: write
20+
contents: read # Required to read label configuration
21+
pull-requests: write # Required to add labels to PRs
1522
runs-on: ubuntu-latest
1623
steps:
1724
- uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1

.github/workflows/nightly_wheels.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
permissions:
1010
contents: read
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1216
jobs:
1317
build_and_upload_nightly:
1418
name: Build and upload nightly wheels

.github/workflows/releases.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
path: dist
4747

4848
test_dist_pypi:
49+
name: Test distribution artifacts
4950
needs: [build_artifacts]
5051
runs-on: ubuntu-latest
5152
steps:
@@ -60,16 +61,17 @@ jobs:
6061
ls dist
6162
6263
upload_pypi:
64+
name: Upload to PyPI
6365
needs: [build_artifacts, test_dist_pypi]
6466
runs-on: ubuntu-latest
6567
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
6668
environment:
6769
name: releases
6870
url: https://pypi.org/p/zarr
6971
permissions:
70-
id-token: write
71-
attestations: write
72-
artifact-metadata: write
72+
id-token: write # Required for OIDC trusted publishing to PyPI
73+
attestations: write # Required for artifact attestation
74+
artifact-metadata: write # Required for artifact attestation metadata
7375
steps:
7476
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
7577
with:

.github/workflows/test.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,17 @@ jobs:
5959
with:
6060
version: '1.16.5'
6161
- name: Set Up Hatch Env
62+
env:
63+
HATCH_ENV: test.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
6264
run: |
63-
hatch env create test.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
64-
hatch env run -e test.py${{ matrix.python-version }}-${{ matrix.dependency-set }} list-env
65+
hatch env create "$HATCH_ENV"
66+
hatch env run -e "$HATCH_ENV" list-env
6567
- name: Run Tests
6668
env:
6769
HYPOTHESIS_PROFILE: ci
70+
HATCH_ENV: test.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
6871
run: |
69-
hatch env run --env test.py${{ matrix.python-version }}-${{ matrix.dependency-set }} run-coverage
72+
hatch env run --env "$HATCH_ENV" run-coverage
7073
- name: Upload coverage
7174
if: ${{ matrix.dependency-set == 'optional' && matrix.os == 'ubuntu-latest' }}
7275
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5.5.3
@@ -104,12 +107,16 @@ jobs:
104107
with:
105108
version: '1.16.5'
106109
- name: Set Up Hatch Env
110+
env:
111+
HATCH_ENV: ${{ matrix.dependency-set }}
107112
run: |
108-
hatch env create ${{ matrix.dependency-set }}
109-
hatch env run -e ${{ matrix.dependency-set }} list-env
113+
hatch env create "$HATCH_ENV"
114+
hatch env run -e "$HATCH_ENV" list-env
110115
- name: Run Tests
116+
env:
117+
HATCH_ENV: ${{ matrix.dependency-set }}
111118
run: |
112-
hatch env run --env ${{ matrix.dependency-set }} run-coverage
119+
hatch env run --env "$HATCH_ENV" run-coverage
113120
- name: Upload coverage
114121
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5.5.3
115122
with:

0 commit comments

Comments
 (0)