Skip to content

Commit acfb4e2

Browse files
authored
GitHub Actions: Test on Python 3.11 production release (#187)
* GitHub Actions: Test on Python 3.11 production release Also add Python 3.12-dev * pyproject.toml: Add ruff settings * Lint with ruff * Add a few pylint rules
1 parent 9f38221 commit acfb4e2

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed

.github/workflows/python_tests.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
runs-on: ${{ matrix.os }}
1414
strategy:
1515
fail-fast: false
16-
max-parallel: 8
16+
max-parallel: 6
1717
matrix:
1818
os: [macos-latest, ubuntu-latest] # , windows-latest]
19-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"]
19+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12-dev"]
2020
steps:
2121
- uses: actions/checkout@v3
2222
- name: Set up Python ${{ matrix.python-version }}
@@ -30,7 +30,9 @@ jobs:
3030
- run: ./gyp -V && ./gyp --version && gyp -V && gyp --version
3131
- name: Lint with flake8
3232
run: flake8 . --ignore=E203,W503 --max-complexity=101 --max-line-length=88 --show-source --statistics
33-
- name: Test with pytest
33+
- name: Lint with ruff # See pyproject.toml for settings
34+
run: flake8 .
35+
- name: Test with pytest # See pyproject.toml for settings
3436
run: pytest
3537
# - name: Run doctests with pytest
3638
# run: pytest --doctest-modules

pyproject.toml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ authors = [
1111
description = "A fork of the GYP build system for use in the Node.js projects"
1212
readme = "README.md"
1313
license = { file="LICENSE" }
14-
requires-python = ">=3.6"
14+
requires-python = ">=3.7"
1515
classifiers = [
1616
"Development Status :: 3 - Alpha",
1717
"Environment :: Console",
@@ -20,22 +20,39 @@ classifiers = [
2020
"Natural Language :: English",
2121
"Programming Language :: Python",
2222
"Programming Language :: Python :: 3",
23-
"Programming Language :: Python :: 3.6",
2423
"Programming Language :: Python :: 3.7",
2524
"Programming Language :: Python :: 3.8",
2625
"Programming Language :: Python :: 3.9",
2726
"Programming Language :: Python :: 3.10",
27+
"Programming Language :: Python :: 3.11",
2828
]
2929

3030
[project.optional-dependencies]
31-
dev = ["flake8", "pytest"]
31+
dev = ["flake8", "ruff", "pytest"]
3232

3333
[project.scripts]
3434
gyp = "gyp:script_main"
3535

3636
[project.urls]
3737
"Homepage" = "https://github.com/nodejs/gyp-next"
3838

39+
[tool.ruff]
40+
line-length = 88
41+
select = [
42+
"C9",
43+
"E",
44+
"F",
45+
"PLC",
46+
"PLE",
47+
"PLW",
48+
"Q",
49+
"W",
50+
]
51+
target-version = "py37"
52+
53+
[tool.ruff.mccabe]
54+
max-complexity = 101
55+
3956
[tool.setuptools]
4057
package-dir = {"" = "pylib"}
4158
packages = ["gyp", "gyp.generator"]

0 commit comments

Comments
 (0)