Skip to content

Commit ffff026

Browse files
authored
Merge pull request #24 from RytoEX/update-action
Fix macOS matrix, update first-party GitHub Actions, fix use-external-python, update all requirements and linters
2 parents 74c70a8 + 53651b0 commit ffff026

File tree

6 files changed

+31
-35
lines changed

6 files changed

+31
-35
lines changed

.github/workflows/all-lints.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,8 @@ jobs:
99
strategy:
1010
matrix:
1111
os: [ubuntu-latest, macos-14, macos-latest, windows-latest]
12-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
12+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
1313
exclude:
14-
- os: macos-latest
15-
python-version: 3.8
16-
- os: macos-latest
17-
python-version: 3.9
1814
- os: macos-latest
1915
python-version: 3.10
2016
- os: macos-14
@@ -25,7 +21,7 @@ jobs:
2521
python-version: 3.10
2622

2723
steps:
28-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v6
2925
- uses: ./
3026
with:
3127
python-root-list: "./tests/*.py ./tests/subtest/*.py"

.github/workflows/test-python-install.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
env:
1515
python-test-package: python-dummy
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v6
1818

1919
- name: Install Python if required
2020
if: ${{ matrix.use-external-python }}
21-
uses: actions/setup-python@v5
21+
uses: actions/setup-python@v6
2222
with:
2323
python-version: ${{ matrix.python-version }}
2424

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,41 +32,41 @@ Basic:
3232

3333
```yml
3434
steps:
35-
- uses: actions/checkout@v4
35+
- uses: actions/checkout@v6
3636
- uses: marian-code/python-lint-annotate@v4
3737
```
3838
3939
Options:
4040
4141
```yml
4242
steps:
43-
- uses: actions/checkout@v4
43+
- uses: actions/checkout@v6
4444
- uses: marian-code/python-lint-annotate@v4
4545
with:
4646
python-root-list: "src/ tests/*" # accepts wildcards
4747
use-pycodestyle: false
4848
use-mypy: false
4949
use-vulture: true
5050
extra-pylint-options: "--output-format="colorized"
51-
python-version: "3.8"
51+
python-version: "3.10"
5252
```
5353
5454
### Examples
5555
* [Only lint changed files, and ignore missing docstrings](examples/actions-only_changed_files.yml)
5656
5757
## Details
5858
59-
Uses `actions/setup-python@v5`. Only python `3.8` - `3.12` versions are tested.
60-
Python `3.x` versions prior to `3.8` are not tested since they are EOL now.
59+
Uses `actions/setup-python@v6`. Only python `3.10` - `3.14` versions are tested.
60+
Python `3.x` versions prior to `3.10` are not tested since they are EOL now.
6161
Any python `2.x` versions are unsupported! You can lint on Linux, Windows and MacOS.
6262

6363
The linter versions are defined in [requirements.txt](requirements.txt).
6464

6565
## IMPORTANT - test environment
6666

67-
The python version is set by `actions/setup-python@v5` using composite actions. This
67+
The python version is set by `actions/setup-python@v6` using composite actions. This
6868
means that the the action will change python you might have previously set with
69-
`actions/setup-python@v5`. There are two ways to circumvent this.
69+
`actions/setup-python@v6`. There are two ways to circumvent this.
7070

7171
- Keep the lintnig action separated from others
7272
- Use it at the and of your workflow when the change in python version will not
@@ -84,12 +84,12 @@ jobs:
8484
name: Lint Python
8585
runs-on: ubuntu-latest
8686
steps:
87-
- uses: actions/checkout@v4
88-
- uses: actions/setup-python@v5
87+
- uses: actions/checkout@v6
88+
- uses: actions/setup-python@v6
8989
with:
90-
python-version: 3.9
90+
python-version: 3.10
9191
- run: |
92-
python --version # this will output 3.9 now
92+
python --version # this will output 3.10 now
9393
run tests or other things using python ...
9494
- uses: marian-code/python-lint-annotate@v4
9595
with:
@@ -103,9 +103,9 @@ jobs:
103103
use-pylint: false
104104
use-flake8: false
105105
use-vulture: true
106-
python-version: "3.8"
106+
python-version: "3.10"
107107
- run: |
108-
python --version # this will output 3.8 now !!!
108+
python --version # this will output 3.10 now !!!
109109
```
110110

111111
## License

action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ inputs:
7575
python-version:
7676
description: "Set desired python version with this keyword"
7777
required: false
78-
default: "3.8"
78+
default: "3.10"
7979
use-external-python:
8080
description: "false (default): Install a new Python for this action; true: use the python installation in the previous steps"
8181
type: boolean
@@ -86,8 +86,8 @@ runs:
8686
using: "composite"
8787
steps:
8888
- name: Setup python
89-
if: ${{ ! inputs.use-external-python }}
90-
uses: actions/setup-python@v5
89+
if: ${{ ! fromJSON(inputs.use-external-python) }}
90+
uses: actions/setup-python@v6
9191
with:
9292
python-version: ${{ inputs.python-version }}
9393
architecture: x64

examples/actions-only_changed_files.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ jobs:
88
name: Lint
99
steps:
1010
- name: Check out source repository
11-
uses: actions/checkout@v4
11+
uses: actions/checkout@v6
1212
with:
1313
fetch-depth: 0 # This is necessary to get the commits
1414
- name: Set up Python environment
15-
uses: actions/setup-python@v5
15+
uses: actions/setup-python@v6
1616
with:
17-
python-version: "3.8"
17+
python-version: "3.10"
1818
- name: Get changed python files between base and head
1919
run: >
2020
echo "CHANGED_FILES=$(echo $(git diff --name-only ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} -- | grep \.py))" >> $GITHUB_ENV
2121
- if: ${{ env.CHANGED_FILES }}
22-
uses: marian-code/python-lint-annotate@v3
22+
uses: marian-code/python-lint-annotate@v4
2323
with:
2424
python-root-list: ${{ env.CHANGED_FILES }}
2525
extra-pylint-options: "--disable=C0114,C0116" # Missing doctrings

requirements.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
black==24.3.0
2-
flake8==7.0.0
3-
isort==5.13.2
4-
mypy~=1.9.0
5-
pycodestyle==2.11.1
1+
black==26.1.0
2+
flake8==7.3.0
3+
isort==8.0.0
4+
mypy~=1.19.1
5+
pycodestyle==2.14.0
66
pydocstyle==6.3.0
7-
pylint==3.1.0
8-
vulture==2.11
7+
pylint==4.0.5
8+
vulture==2.14

0 commit comments

Comments
 (0)