Skip to content

Commit 086e899

Browse files
Update and pin GitHub Actions; stop testing EOL Python 3.7-3.9 in CI (#65)
1 parent f7926e8 commit 086e899

3 files changed

Lines changed: 54 additions & 18 deletions

File tree

.github/workflows/tests.yaml

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ concurrency:
88
group: ${{ github.workflow }}-${{ github.ref }}
99
cancel-in-progress: true
1010

11+
permissions:
12+
# Allow each job to check out the repo.
13+
contents: read
14+
1115
jobs:
1216
lint:
13-
runs-on: ubuntu-latest
17+
runs-on: ubuntu-24.04
1418
strategy:
1519
matrix:
1620
toxenv:
@@ -20,22 +24,26 @@ jobs:
2024
- "mypy"
2125

2226
steps:
23-
- uses: actions/checkout@v2
24-
- uses: actions/setup-python@v2
27+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28+
with:
29+
persist-credentials: false
30+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2531
with:
26-
python-version: "3.7"
32+
python-version: "3.10"
2733
- run: pip install tox
2834
- run: tox -e ${{ matrix.toxenv }}
2935

3036
unittest:
31-
runs-on: ubuntu-latest
37+
runs-on: ubuntu-24.04
3238
strategy:
3339
matrix:
34-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy-3.7"]
40+
python-version: ["3.10", "3.11"]
3541

3642
steps:
37-
- uses: actions/checkout@v2
38-
- uses: actions/setup-python@v2
43+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
44+
with:
45+
persist-credentials: false
46+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
3947
with:
4048
python-version: ${{ matrix.python-version }}
4149
- run: pip install tox
@@ -48,20 +56,24 @@ jobs:
4856
os: [ubuntu-latest, macos-latest]
4957

5058
steps:
51-
- uses: actions/checkout@v2
52-
- uses: actions/setup-python@v2
59+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
60+
with:
61+
persist-credentials: false
62+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
5363
- run: python -m pip install tox
5464
- run: tox -e packaging
5565

5666
macos-tests:
57-
runs-on: macos-latest
67+
runs-on: macos-26
5868
strategy:
5969
matrix:
60-
python-version: ["3.8", "3.9", "3.10", "3.11"]
70+
python-version: ["3.10", "3.11"]
6171

6272
steps:
63-
- uses: actions/checkout@v2
64-
- uses: actions/setup-python@v2
73+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
74+
with:
75+
persist-credentials: false
76+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
6577
with:
6678
python-version: ${{ matrix.python-version }}
6779
- run: pip install tox

.github/workflows/zizmor.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Taken from https://github.com/zizmorcore/zizmor-action/blob/06928c5dcba418c7d6108a4bd6e2d34cbf3c9377/README.md
2+
name: GitHub Actions Security Analysis with zizmor 🌈
3+
4+
on:
5+
push:
6+
branches: ["main"]
7+
pull_request:
8+
branches: ["**"]
9+
10+
permissions: {}
11+
12+
jobs:
13+
zizmor:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
security-events: write
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
20+
with:
21+
persist-credentials: false
22+
23+
- name: Run zizmor 🌈
24+
uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3

tox.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = packaging, pep8, black, py37, py38, py39, py310, pypy3, mypy, isort
2+
envlist = packaging, pep8, black, py310, pypy3, mypy, isort
33
isolated_build = True
44

55
[testenv:py]
@@ -16,19 +16,19 @@ deps =
1616
commands = check-manifest
1717

1818
[testenv:pep8]
19-
basepython = python3.7
19+
basepython = python3.10
2020
deps =
2121
flake8
2222
commands = flake8 src tests
2323

2424
[testenv:isort]
25-
basepython = python3.7
25+
basepython = python3.10
2626
deps =
2727
isort
2828
commands = isort --check src tests
2929

3030
[testenv:black]
31-
basepython = python3.7
31+
basepython = python3.10
3232
deps =
3333
black==23.1.0
3434
commands = python -m black --check --diff src tests

0 commit comments

Comments
 (0)