Skip to content

Commit

Permalink
Testing: Upgrade GitHub Actions and Python
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Nov 29, 2023
1 parent bbdbbc8 commit 150021c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-latest, macos-11, macos-latest, windows-2019, windows-latest]
python-version: ['3.5', '3.6', '3.7', '3.8']
python-version: ['3.5', '3.6', '3.7', '3.8', '3.12']
exclude:
# Python 3.5 and 3.6 not available in the latest Ubuntu runners
- os: ubuntu-latest
Expand All @@ -23,7 +23,7 @@ jobs:
runs-on: ${{ matrix.os }}
name: Test Py ${{ matrix.python-version }} - ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -60,10 +60,10 @@ jobs:
runs-on: ubuntu-latest
name: Test Py 3.7 - arm-debian-buster
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:latest
platforms: 'linux/arm64,linux/arm/v7,linux/arm/v6'
Expand Down
9 changes: 5 additions & 4 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,13 @@ def black():
import black as black_ # noqa: F401
except ImportError as e:
python_version = sys.version_info
if python_version.major == 3 and python_version.minor == 5:
print("Black checks are not available in Python 3.5.")
return 0
else:
if (3, 5) < python_version < (3, 12):
print(e)
return 1
else:
py_ver_str = "Python {}.{}".format(*python_version)
print("Black v22.1.0 is incompatible with {}.".format(py_ver_str))
return 0
for target in [
"setup.py",
"make.py",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"flake8 >= 3.8.3",
# Clamp click max version to workaround incompatibility with black<22.1.0
"click<=8.0.4",
"black>=19.10b0,<22.1.0;python_version>'3.5'",
"black>=19.10b0,<22.1.0;python_version>'3.5',<'3.12'",
"platformdirs>=2.0.0,<3.0.0",
"semver>=2.8.0",
# virtualenv vendors pip, we need at least pip v19.3 to install some
Expand Down

0 comments on commit 150021c

Please sign in to comment.