Skip to content

Commit ec23e4c

Browse files
bors[bot]sanders41
andauthored
Merge #116
116: Adding support for Python 3.9 r=bidoubiwa a=sanders41 Closes #115 Co-authored-by: Paul Sanders <[email protected]>
2 parents e4de678 + 1004c94 commit ec23e4c

File tree

8 files changed

+220
-29
lines changed

8 files changed

+220
-29
lines changed

.github/workflows/tests.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,18 @@ jobs:
2727
run: pipenv run pylint scraper
2828

2929
unit_tests:
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
python-version: [3.8, 3.9]
3034
name: unit-tests
3135
runs-on: ubuntu-18.04
3236
steps:
3337
- uses: actions/checkout@v2
34-
- name: Set up Python 3.8
38+
- name: Set up Python ${{ matrix.python-version }}
3539
uses: actions/setup-python@v1
3640
with:
37-
python-version: 3.8
41+
python-version: ${{ matrix.python-version }}
3842
- name: Install pipenv
3943
uses: dschep/install-pipenv-action@v1
4044
- name: Install dependencies
@@ -43,14 +47,18 @@ jobs:
4347
run: pipenv run pytest ./scraper/src -k "not _browser"
4448

4549
integration_tests:
50+
strategy:
51+
fail-fast: false
52+
matrix:
53+
python-version: [3.8, 3.9]
4654
name: integration-tests
4755
runs-on: ubuntu-18.04
4856
steps:
4957
- uses: actions/checkout@v2
50-
- name: Set up Python 3.8
58+
- name: Set up Python ${{ matrix.python-version }}
5159
uses: actions/setup-python@v1
5260
with:
53-
python-version: 3.8
61+
python-version: ${{ matrix.python-version }}
5462
- name: Install pipenv
5563
uses: dschep/install-pipenv-action@v1
5664
- name: Install dependencies for production only

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ src/strategies/__pycache__/
99
.env
1010
update.sh
1111
.python-version
12+
.tox
1213

1314
*yarn.lock
1415

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ pipenv run pylint scraper
4949
pipenv run pytest ./scraper/src -k "not _browser"
5050
```
5151

52+
Optionally tox can be used to run test on all supported version of Python and linting.
53+
54+
```bash
55+
pipenv run tox
56+
```
57+
5258
## Git Guidelines
5359

5460
### Git Branches <!-- omit in TOC -->

Pipfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@ python-keycloak-client = "==0.2.3"
1313

1414
[dev-packages]
1515
pylint = "==2.6.2"
16-
17-
[requires]
18-
python_version = "3.8"
16+
tox = "==3.23.0"
17+
tox-pipenv = "==1.10.1"

Pipfile.lock

Lines changed: 169 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ In our case, the main container is `theme-default-content` and the selector the
136136

137137
#### From Source Code <!-- omit in TOC -->
138138

139-
This project supports Python 3.8.
139+
This project supports Python 3.8 and above.
140140

141141
The [`pipenv` command](https://pipenv.readthedocs.io/en/latest/install/#installing-pipenv) must be installed.
142142

bors.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1-
status = ['unit-tests', 'integration-tests', 'linter', 'image-build']
1+
status = [
2+
'unit-tests (3.8)',
3+
'unit-tests (3.9)',
4+
'integration-tests (3.8)',
5+
'integration-tests (3.9)',
6+
'linter',
7+
'image-build',
8+
]
29
# 1 hour timeout
310
timeout-sec = 3600

tox.ini

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[tox]
2+
envlist = pylint, py38, py39
3+
skipsdist=True
4+
5+
[testenv:pylint]
6+
whitelist_externals =
7+
pipenv
8+
python
9+
deps = pylint
10+
commands =
11+
pipenv install --dev
12+
pipenv run pylint scraper
13+
14+
[testenv]
15+
whitelist_externals =
16+
pipenv
17+
python
18+
deps = pytest
19+
commands =
20+
pipenv install --dev
21+
pipenv run pytest ./scraper/src -k "not _browser"

0 commit comments

Comments
 (0)