-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore CI, including Python 2.7 (#492)
* Restores CI to a green state to aid in landing other changes. * Python 2.7 is still covered, but only on Ubuntu and excluding PyPy. Changes are made to `requirements.txt` et al to ensure this works. * Runner versions are pinned to avoid automatic breakage, required statuses are updated to match. * Codecov action is updated, token is now explicitly passed. * Fixes an integration test breaking due to backend changes, to be investigated separately.
- Loading branch information
1 parent
487793d
commit 75596da
Showing
8 changed files
with
74 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,18 +10,27 @@ jobs: | |
# https://github.com/actions/python-versions/blob/main/versions-manifest.json | ||
strategy: | ||
matrix: | ||
os: [macos-latest, windows-latest] | ||
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, pypy-2.7, pypy-3.7] | ||
os: [macos-13, windows-latest] | ||
python-version: [3.5, 3.6, 3.7, 3.8, pypy-3.7] | ||
exclude: | ||
- os: windows-latest | ||
python-version: 3.6 | ||
include: | ||
- os: ubuntu-latest | ||
- os: ubuntu-20.04 | ||
python-version: 3.7 | ||
- os: ubuntu-20.04 | ||
python-version: 2.7 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Python environment | ||
uses: actions/[email protected] | ||
- if: ${{ matrix.python-version == '2.7' }} | ||
name: Setup Python environment (2.7) | ||
run: | | ||
sudo apt-get install python-is-python2 | ||
curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py | ||
python get-pip.py | ||
- if: ${{ matrix.python-version != '2.7' }} | ||
name: Setup Python environment | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Requirements | ||
|
@@ -30,19 +39,19 @@ jobs: | |
pip install flake8 pytest | ||
pip install -r requirements.txt | ||
pip install -r test/requirements.txt | ||
python setup.py install | ||
python setup.py install --user | ||
- name: Run Linter | ||
run: | | ||
flake8 setup.py dropbox example test | ||
- name: Run Unit Tests | ||
run: | | ||
pytest test/unit/test_dropbox_unit.py | ||
pytest -v test/unit/test_dropbox_unit.py | ||
Docs: | ||
runs-on: macos-latest | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Python environment | ||
uses: actions/setup-python@v2.2.2 | ||
uses: actions/setup-python@v3.1.4 | ||
with: | ||
python-version: '3.7' | ||
- name: Install Requirements | ||
|
@@ -64,18 +73,27 @@ jobs: | |
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-latest, windows-latest] | ||
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, pypy-2.7, pypy-3.7] | ||
exclude: | ||
- os: windows-latest | ||
python-version: 3.6 | ||
include: | ||
- os: ubuntu-latest | ||
python-version: 3.7 | ||
steps: | ||
os: [macos-13, windows-latest] | ||
python-version: [3.5, 3.6, 3.7, 3.8, pypy-3.7] | ||
exclude: | ||
- os: windows-latest | ||
python-version: 3.6 | ||
include: | ||
- os: ubuntu-20.04 | ||
python-version: 3.7 | ||
- os: ubuntu-20.04 | ||
python-version: 2.7 | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Setup Python environment | ||
uses: actions/[email protected] | ||
- if: ${{ matrix.python-version == '2.7' }} | ||
name: Setup Python environment (2.7) | ||
run: | | ||
sudo apt-get install python-is-python2 | ||
curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py | ||
python get-pip.py | ||
- if: ${{ matrix.python-version != '2.7' }} | ||
name: Setup Python environment | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Requirements | ||
|
@@ -84,7 +102,7 @@ jobs: | |
pip install flake8 pytest | ||
pip install -r requirements.txt | ||
pip install -r test/requirements.txt | ||
python setup.py install | ||
python setup.py install --user | ||
- name: Run Integration Tests | ||
env: | ||
LEGACY_USER_DROPBOX_TOKEN: ${{ secrets.LEGACY_USER_DROPBOX_TOKEN }} | ||
|
@@ -101,4 +119,4 @@ jobs: | |
SCOPED_TEAM_REFRESH_TOKEN: ${{ secrets.SCOPED_TEAM_REFRESH_TOKEN }} | ||
DROPBOX_SHARED_LINK: ${{ secrets.DROPBOX_SHARED_LINK }} | ||
run: | | ||
pytest test/integration/test_dropbox.py | ||
pytest -v test/integration/test_dropbox.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,15 +9,22 @@ on: | |
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
python-version: [2.7, 3.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Python | ||
uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
- if: ${{ matrix.python-version == '2.7' }} | ||
name: Setup Python environment (2.7) | ||
run: | | ||
sudo apt-get install python-is-python2 | ||
curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py | ||
python get-pip.py | ||
- if: ${{ matrix.python-version != '2.7' }} | ||
name: Setup Python environment | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
# Dependencies required for installation (keep in sync with setup.py) | ||
requests >= 2.16.2 | ||
requests<2.30 | ||
urllib3<2 | ||
six >= 1.12.0 | ||
stone >= 2 | ||
stone>=2,<3.3.3 | ||
# Other dependencies for development | ||
ply | ||
pytest | ||
pytest-runner | ||
pytest-runner==5.2.0 | ||
sphinx | ||
twine | ||
wheel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ pytest | |
mock | ||
pytest-mock | ||
coverage | ||
stone>=2 | ||
stone>=2,<3.3.3 |