Skip to content

Commit

Permalink
Add Python 2.7 to GHA Linux (#584)
Browse files Browse the repository at this point in the history
  • Loading branch information
gliptak authored Oct 10, 2022
1 parent 50b189f commit 2784660
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ on:
jobs:
build:

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: [2.7, "3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-latest]

steps:
#
Expand All @@ -30,12 +31,18 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
#
- name: Install deps
- name: Install dev deps
if: matrix.python-version != 2.7
run: |
python -m pip install --upgrade pip
make setup-dev-env PYTHON=python
#
- name: Install test deps
if: matrix.python-version == 2.7
run: |
make setup-test-env PYTHON=python
#
- name: Lint
if: matrix.python-version != 2.7
run: |
make lint-all PYTHON=python
#
Expand Down Expand Up @@ -63,7 +70,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
#
- name: Install deps
- name: Install test deps
run: |
python.exe -m pip install --upgrade --user setuptools pip wheel
python.exe -m pip install --upgrade unittest2 mock ipaddress pypiwin32 wmi pyopenssl psutil
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ DEV_DEPS = \
flake8-print \
flake8-quotes \
isort \
mock==1.0.1 \
setuptools \
sphinx
TEST_DEPS = \
psutil \
pyopenssl \
pysendfile \
mock==1.0.1 \
unittest2

# In not in a virtualenv, add --user options for install commands.
Expand Down Expand Up @@ -89,11 +89,13 @@ install-pip: ## (only if necessary)
f.close(); \
sys.exit(code);"

setup-dev-env: ## Install GIT hooks, pip, test deps (also upgrades them).
setup-test-env: ## Install GIT hooks, pip, test deps (also upgrades them).
${MAKE} install-git-hooks
${MAKE} install-pip
$(PYTHON) -m pip install $(INSTALL_OPTS) --upgrade pip setuptools
$(PYTHON) -m pip install $(INSTALL_OPTS) --upgrade $(TEST_DEPS)

setup-dev-env: setup-test-env
$(PYTHON) -m pip install $(INSTALL_OPTS) --upgrade $(DEV_DEPS)

# ===================================================================
Expand Down
1 change: 1 addition & 0 deletions pyftpdlib/test/test_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -2274,6 +2274,7 @@ def test_port_race_condition(self):
s, addr = sock.accept()
s.close()

@unittest.skipUnless(POSIX, "POSIX only")
def test_quick_connect(self):
# Clients that connected and disconnected quickly could cause
# the server to crash, due to a failure to catch errors in the
Expand Down

0 comments on commit 2784660

Please sign in to comment.