Skip to content

Commit 5640107

Browse files
authored
Merge pull request #2246 from ocefpaf/zizmor
Add zizmor checks and fix all lints
2 parents 728b2a6 + ec4b608 commit 5640107

12 files changed

Lines changed: 145 additions & 59 deletions

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,14 @@ updates:
1313
github-actions:
1414
patterns:
1515
- '*'
16+
cooldown:
17+
default-days: 7
18+
19+
- package-ecosystem: "pre-commit"
20+
directory: "/"
21+
schedule:
22+
interval: "daily"
23+
labels:
24+
- "Bot"
25+
cooldown:
26+
default-days: 7

.github/workflows/deploy-docs.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,17 @@ jobs:
2222
defaults:
2323
run:
2424
shell: bash -l {0}
25+
env:
26+
REF_NAME: ${{ github.ref_name }}
2527

2628
steps:
27-
- uses: actions/checkout@v7
29+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2830
with:
2931
fetch-depth: 0
32+
persist-credentials: false
3033

3134
- name: Setup Micromamba env
32-
uses: mamba-org/setup-micromamba@v3
35+
uses: mamba-org/setup-micromamba@d7c9bd84e824b79d2af72a2d4196c7f4300d3476 # v3.0.0
3336
with:
3437
environment-name: TEST
3538
init-shell: bash
@@ -45,28 +48,29 @@ jobs:
4548
run: |
4649
set -e
4750
pushd docs
51+
4852
make clean html linkcheck
4953
popd
5054
5155
- name: Update switcher and latest version
5256
if: ${{ github.event_name == 'release' }}
5357
run: |
54-
python docs/update_switcher.py --version ${{ github.ref_name }}
58+
python docs/update_switcher.py --version $REF_NAME
5559
5660
- name: Create PR
5761
if: ${{ github.event_name == 'release' }}
58-
uses: peter-evans/create-pull-request@v8
62+
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
5963
with:
60-
commit-message: "docs: Update switcher.json for ${{ github.ref_name }}"
61-
title: "docs: Update switcher.json for ${{ github.ref_name }}"
64+
commit-message: "docs: Update switcher.json for $REF_NAME"
65+
title: "docs: Update switcher.json for $REF_NAME"
6266
body: "This PR updates the switcher.json file."
63-
branch: "docs/update-switcher-${{ github.ref_name }}"
67+
branch: "docs/update-switcher-$REF_NAME"
6468
base: "main"
6569
labels: "documentation"
6670

6771
- name: Publish to Github Pages on main
6872
if: ${{ github.ref == 'refs/heads/main' }}
69-
uses: peaceiris/actions-gh-pages@v4
73+
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
7074
with:
7175
github_token: ${{ secrets.GITHUB_TOKEN }}
7276
publish_dir: docs/_build/html/
@@ -75,15 +79,15 @@ jobs:
7579

7680
- name: Publish to Github Pages on release (versioned)
7781
if: ${{ github.event_name == 'release' }}
78-
uses: peaceiris/actions-gh-pages@v4
82+
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
7983
with:
8084
github_token: ${{ secrets.GITHUB_TOKEN }}
8185
publish_dir: docs/_build/html/
82-
destination_dir: ${{ github.ref_name }}
86+
destination_dir: $REF_NAME
8387

8488
- name: Publish to Github Pages on release (latest)
8589
if: ${{ github.event_name == 'release' }}
86-
uses: peaceiris/actions-gh-pages@v4
90+
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
8791
with:
8892
github_token: ${{ secrets.GITHUB_TOKEN }}
8993
publish_dir: docs/_build/html/

.github/workflows/pypi.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,27 @@ defaults:
1818
jobs:
1919
packages:
2020
runs-on: ubuntu-latest
21+
environment:
22+
name: pypi
23+
url: https://pypi.org/p/folium/
24+
permissions:
25+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
26+
2127
steps:
22-
- uses: actions/checkout@v7
28+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
29+
with:
30+
# Should be enough for setuptools-scm
31+
fetch-depth: 100
32+
persist-credentials: false
2333

2434
- name: Set up Python
25-
uses: actions/setup-python@v7
35+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
2636
with:
2737
python-version: "3.x"
2838

2939
- name: Get tags
3040
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
3141

32-
3342
- name: Install build tools
3443
run: |
3544
python -m pip install --upgrade pip wheel build twine
@@ -48,7 +57,4 @@ jobs:
4857
4958
- name: Publish a Python distribution to PyPI
5059
if: success() && github.event_name == 'release'
51-
uses: pypa/gh-action-pypi-publish@v1.14.1
52-
with:
53-
user: __token__
54-
password: ${{ secrets.PYPI_PASSWORD }}
60+
uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # v1.14.1

.github/workflows/save_versions.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Save package versions
22

3+
# no permissions by default
4+
permissions: {}
5+
36
on:
47
pull_request:
58
push:
@@ -9,13 +12,18 @@ on:
912
jobs:
1013
run:
1114
runs-on: ubuntu-latest
15+
permissions:
16+
actions: write
1217

1318
steps:
1419
- name: Checkout Folium
15-
uses: actions/checkout@v7
20+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
21+
with:
22+
fetch-depth: 0
23+
persist-credentials: false
1624

1725
- name: Setup Micromamba env
18-
uses: mamba-org/setup-micromamba@v3
26+
uses: mamba-org/setup-micromamba@d7c9bd84e824b79d2af72a2d4196c7f4300d3476 # v3.0.0
1927
with:
2028
environment-name: TEST
2129
create-args: >-
@@ -36,7 +44,7 @@ jobs:
3644
3745
- name: Save versions.txt
3846
if: always()
39-
uses: actions/upload-artifact@v7
47+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
4048
with:
4149
name: versions.txt
4250
path: /tmp/versions.txt

.github/workflows/test_code.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Code Tests
22

3+
# no permissions by default
4+
permissions: {}
5+
36
on:
47
schedule:
58
- cron: "0 13 * * *"
@@ -11,22 +14,27 @@ on:
1114
jobs:
1215
run:
1316
runs-on: ${{ matrix.os }}
17+
permissions:
18+
actions: write
19+
1420
strategy:
1521
matrix:
16-
os: [ubuntu-latest, windows-latest]
17-
python-version: ["3.9", "3.13"]
22+
os: [ ubuntu-latest, windows-latest, macos-latest ]
23+
python-version: [ "3.10", "3.14" ]
1824
fail-fast: false
1925
defaults:
2026
run:
2127
shell: bash -l {0}
2228

2329
steps:
24-
- uses: actions/checkout@v7
30+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
31+
with:
32+
fetch-depth: 0
33+
persist-credentials: false
2534

2635
- name: Setup Micromamba env
27-
uses: mamba-org/setup-micromamba@v3
36+
uses: mamba-org/setup-micromamba@d7c9bd84e824b79d2af72a2d4196c7f4300d3476 # v3.0.0
2837
with:
29-
micromamba-version: '2.6.0-0'
3038
environment-name: TEST
3139
create-args: >-
3240
python=${{ matrix.python-version }}
@@ -48,7 +56,7 @@ jobs:
4856
4957
- name: Upload coverage
5058
if: always()
51-
uses: actions/upload-artifact@v7
59+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
5260
with:
5361
name: coverage-test-code-${{ matrix.os }}-${{ matrix.python-version }}
5462
path: .coverage*

.github/workflows/test_geopandas.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Geopandas tests
22

3+
# no permissions by default
4+
permissions: {}
5+
36
on:
47
schedule:
58
- cron: "0 13 * * *"
@@ -11,29 +14,34 @@ on:
1114
jobs:
1215
run:
1316
runs-on: ubuntu-latest
17+
permissions:
18+
actions: write
19+
1420
defaults:
1521
run:
1622
shell: bash -l {0}
1723

1824
steps:
1925
- name: Checkout Folium
20-
uses: actions/checkout@v7
26+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2127
with:
22-
# needed to get the correct version number for Folium
2328
fetch-depth: 0
29+
persist-credentials: false
2430
path: folium
2531

2632
- name: Setup Micromamba env
27-
uses: mamba-org/setup-micromamba@v3
33+
uses: mamba-org/setup-micromamba@d7c9bd84e824b79d2af72a2d4196c7f4300d3476 # v3.0.0
2834
with:
2935
environment-name: TEST
3036
create-args: >-
3137
python=3.13
3238
--file folium/requirements.txt
3339
3440
- name: Checkout Geopandas
35-
uses: actions/checkout@v7
41+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
3642
with:
43+
fetch-depth: 0
44+
persist-credentials: false
3745
repository: geopandas/geopandas
3846
path: geopandas
3947

@@ -54,7 +62,7 @@ jobs:
5462
5563
- name: Upload coverage
5664
if: always()
57-
uses: actions/upload-artifact@v7
65+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
5866
with:
5967
name: coverage-test-geopandas
6068
path: |

.github/workflows/test_latest_branca.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Code Tests with Latest branca
22

3+
# no permissions by default
4+
permissions: {}
5+
36
on:
47
schedule:
58
- cron: "0 13 * * *"
@@ -16,10 +19,13 @@ jobs:
1619
shell: bash -l {0}
1720

1821
steps:
19-
- uses: actions/checkout@v7
22+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
23+
with:
24+
fetch-depth: 0
25+
persist-credentials: false
2026

2127
- name: Setup Micromamba env
22-
uses: mamba-org/setup-micromamba@v3
28+
uses: mamba-org/setup-micromamba@d7c9bd84e824b79d2af72a2d4196c7f4300d3476 # v3.0.0
2329
with:
2430
environment-name: TEST
2531
create-args: >-
@@ -38,9 +44,11 @@ jobs:
3844
3945
- name: Upload coverage
4046
if: always()
41-
uses: actions/upload-artifact@v7
47+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
4248
with:
4349
name: coverage-test-branca
4450
path: |
4551
.coverage*
4652
include-hidden-files: true
53+
permissions:
54+
actions: write

.github/workflows/test_mypy.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Mypy type hint checks
22

3+
# no permissions by default
4+
permissions: {}
5+
6+
37
on:
48
schedule:
59
- cron: "0 13 * * *"
@@ -16,10 +20,13 @@ jobs:
1620
shell: bash -l {0}
1721

1822
steps:
19-
- uses: actions/checkout@v7
23+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
24+
with:
25+
fetch-depth: 0
26+
persist-credentials: false
2027

2128
- name: Setup Micromamba env
22-
uses: mamba-org/setup-micromamba@v3
29+
uses: mamba-org/setup-micromamba@d7c9bd84e824b79d2af72a2d4196c7f4300d3476 # v3.0.0
2330
with:
2431
environment-name: TEST
2532
create-args: >-

.github/workflows/test_selenium.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Selenium Tests
22

3+
# no permissions by default
4+
permissions: {}
5+
36
on:
47
schedule:
58
- cron: "0 13 * * *"
@@ -13,17 +16,22 @@ jobs:
1316
runs-on: ubuntu-latest
1417
strategy:
1518
matrix:
16-
python-version: [ "3.9", "3.13" ]
19+
python-version: [ "3.9", "3.14" ]
1720
fail-fast: false
1821
defaults:
1922
run:
2023
shell: bash -l {0}
24+
permissions:
25+
actions: write
2126

2227
steps:
23-
- uses: actions/checkout@v7
28+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
29+
with:
30+
fetch-depth: 0
31+
persist-credentials: false
2432

2533
- name: Setup Micromamba env
26-
uses: mamba-org/setup-micromamba@v3
34+
uses: mamba-org/setup-micromamba@d7c9bd84e824b79d2af72a2d4196c7f4300d3476 # v3.0.0
2735
with:
2836
environment-name: TEST
2937
create-args: >-
@@ -39,7 +47,7 @@ jobs:
3947

4048
- name: Upload coverage
4149
if: always()
42-
uses: actions/upload-artifact@v7
50+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
4351
with:
4452
name: coverage-test-selenium-${{ matrix.python-version }}
4553
path: |

0 commit comments

Comments
 (0)