Skip to content

Commit 3a3a19d

Browse files
committed
wip: restore ci, including python 2.7
1 parent 487793d commit 3a3a19d

File tree

5 files changed

+46
-19
lines changed

5 files changed

+46
-19
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,26 @@ jobs:
1010
# https://github.com/actions/python-versions/blob/main/versions-manifest.json
1111
strategy:
1212
matrix:
13-
os: [macos-latest, windows-latest]
14-
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, pypy-2.7, pypy-3.7]
13+
os: [macos-13, windows-latest]
14+
python-version: [3.5, 3.6, 3.7, 3.8, pypy-3.7]
1515
exclude:
1616
- os: windows-latest
1717
python-version: 3.6
1818
include:
19-
- os: ubuntu-latest
19+
- os: ubuntu-20.04
2020
python-version: 3.7
21+
- os: ubuntu-20.04
22+
python-version: 2.7
2123
steps:
2224
- uses: actions/checkout@v2
23-
- name: Setup Python environment
25+
- if: ${{ matrix.python-version == '2.7' }}
26+
name: Setup Python environment (2.7)
27+
run: |
28+
sudo apt-get install python-is-python2
29+
curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
30+
python get-pip.py
31+
- if: ${{ matrix.python-version != '2.7' }}
32+
name: Setup Python environment
2433
uses: actions/setup-python@v2.2.2
2534
with:
2635
python-version: ${{ matrix.python-version }}
@@ -38,7 +47,7 @@ jobs:
3847
run: |
3948
pytest test/unit/test_dropbox_unit.py
4049
Docs:
41-
runs-on: macos-latest
50+
runs-on: macos-13
4251
steps:
4352
- uses: actions/checkout@v2
4453
- name: Setup Python environment
@@ -64,17 +73,26 @@ jobs:
6473
runs-on: ${{ matrix.os }}
6574
strategy:
6675
matrix:
67-
os: [macos-latest, windows-latest]
68-
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, pypy-2.7, pypy-3.7]
76+
os: [macos-13, windows-latest]
77+
python-version: [3.5, 3.6, 3.7, 3.8, pypy-3.7]
6978
exclude:
7079
- os: windows-latest
7180
python-version: 3.6
7281
include:
73-
- os: ubuntu-latest
82+
- os: ubuntu-20.04
7483
python-version: 3.7
84+
- os: ubuntu-20.04
85+
python-version: 2.7
7586
steps:
7687
- uses: actions/checkout@v2.3.4
77-
- name: Setup Python environment
88+
- if: ${{ matrix.python-version == '2.7' }}
89+
name: Setup Python environment (2.7)
90+
run: |
91+
sudo apt-get install python-is-python2
92+
curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
93+
python get-pip.py
94+
- if: ${{ matrix.python-version != '2.7' }}
95+
name: Setup Python environment
7896
uses: actions/setup-python@v2.2.2
7997
with:
8098
python-version: ${{ matrix.python-version }}
@@ -101,4 +119,4 @@ jobs:
101119
SCOPED_TEAM_REFRESH_TOKEN: ${{ secrets.SCOPED_TEAM_REFRESH_TOKEN }}
102120
DROPBOX_SHARED_LINK: ${{ secrets.DROPBOX_SHARED_LINK }}
103121
run: |
104-
pytest test/integration/test_dropbox.py
122+
pytest test/integration/test_dropbox.py

.github/workflows/pypiupload.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,21 @@ on:
99

1010
jobs:
1111
deploy:
12-
runs-on: ubuntu-latest
12+
runs-on: ubuntu-20.04
1313
strategy:
1414
matrix:
1515
python-version: [2.7, 3.x]
1616

1717
steps:
1818
- uses: actions/checkout@v2
19-
- name: Setup Python
19+
- if: ${{ matrix.python-version == '2.7' }}
20+
name: Setup Python environment (2.7)
21+
run: |
22+
sudo apt-get install python-is-python2
23+
curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
24+
python get-pip.py
25+
- if: ${{ matrix.python-version != '2.7' }}
26+
name: Setup Python environment
2027
uses: actions/setup-python@v2.2.2
2128
with:
2229
python-version: ${{ matrix.python-version }}

requirements.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Dependencies required for installation (keep in sync with setup.py)
2-
requests >= 2.16.2
2+
requests>=2.27
3+
urllib3<2
34
six >= 1.12.0
4-
stone >= 2
5+
stone>=2,<3.3.3
56
# Other dependencies for development
67
ply
78
pytest
8-
pytest-runner
9+
pytest-runner==5.2.0
910
sphinx
1011
twine
1112
wheel

setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,16 @@
2525
version = eval(line.split('=', 1)[1].strip()) # pylint: disable=eval-used
2626

2727
install_reqs = [
28-
'requests >= 2.16.2',
28+
'requests>=2.27',
29+
'urllib3<2',
2930
'six >= 1.12.0',
30-
'stone >= 2',
31+
'stone>=2,<3.3.3',
3132
]
3233

3334
setup_requires = [
3435
# Pin pytest-runner to 5.2.0, since 5.3.0 uses `find_namespaces` directive, not supported in
3536
# Python 2.7
36-
'pytest-runner == 5.2.0',
37+
'pytest-runner==5.2.0',
3738
]
3839

3940
# WARNING: This imposes limitations on test/requirements.txt such that the

test/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ pytest
22
mock
33
pytest-mock
44
coverage
5-
stone>=2
5+
stone>=2,<3.3.3

0 commit comments

Comments
 (0)