Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,18 @@ jobs:
run: pipenv run pylint scraper

unit_tests:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
name: unit-tests
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: ${{ matrix.python-version }}
- name: Install pipenv
uses: dschep/install-pipenv-action@v1
- name: Install dependencies
Expand All @@ -43,14 +47,18 @@ jobs:
run: pipenv run pytest ./scraper/src -k "not _browser"

integration_tests:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
name: integration-tests
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: ${{ matrix.python-version }}
- name: Install pipenv
uses: dschep/install-pipenv-action@v1
- name: Install dependencies for production only
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ src/strategies/__pycache__/
.env
update.sh
.python-version
.tox

*yarn.lock

Expand Down
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ pipenv run pylint scraper
pipenv run pytest ./scraper/src -k "not _browser"
```

Optionally tox can be used to run test on all supported version of Python and linting.

```bash
pipenv run tox
```

## Git Guidelines

### Git Branches <!-- omit in TOC -->
Expand Down
5 changes: 2 additions & 3 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ python-keycloak-client = "==0.2.3"

[dev-packages]
pylint = "==2.6.2"

[requires]
python_version = "3.8"
tox = "==3.23.0"
tox-pipenv = "==1.10.1"
189 changes: 169 additions & 20 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ In our case, the main container is `theme-default-content` and the selector the

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

This project supports Python 3.8.
This project supports Python 3.8 and above.

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

Expand Down
9 changes: 8 additions & 1 deletion bors.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
status = ['unit-tests', 'integration-tests', 'linter', 'image-build']
status = [
'unit-tests (3.8)',
'unit-tests (3.9)',
'integration-tests (3.8)',
'integration-tests (3.9)',
'linter',
'image-build',
]
# 1 hour timeout
timeout-sec = 3600
21 changes: 21 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[tox]
envlist = pylint, py38, py39
skipsdist=True

[testenv:pylint]
whitelist_externals =
pipenv
python
deps = pylint
commands =
pipenv install --dev
pipenv run pylint scraper

[testenv]
whitelist_externals =
pipenv
python
deps = pytest
commands =
pipenv install --dev
pipenv run pytest ./scraper/src -k "not _browser"