Skip to content

Commit

Permalink
support regression tests
Browse files Browse the repository at this point in the history
  • Loading branch information
etrabelsi committed Dec 14, 2020
1 parent 0467b52 commit 5135383
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 7 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Unit Tests

on: [pull_request]

jobs:
test:
name: Test
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: [3.4, 3.5, 3.6, 3.7, 3.8, 3.9]
- name: debugging
run: ls
- name: Install Dependencies
run: pip install -e .
- name: Run Pytest
run: tox
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ pandas_log/__pycache__
.cache
.eggs
*.egg-info
.pytest_cache
.tox
build/
dist/
*.ipynb_checkpoints/
*.DS_Store
15 changes: 15 additions & 0 deletions doc_sanitize.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[regex1]
regex: \d{1,2}/\d{1,2}/\d{2,4}
replace: DATE-STAMP

[regex2]
regex: \d{2}:\d{2}:\d{2}
replace: TIME-STAMP

[tqdm_progressbar]
regex: (\d+.+\d+s\/it]|\d+.+\d+it\/s])
replace: ITERATIONS_PER_SECOND

[pandas_index_cell_header]
regex: <t[dh]>[\w\.]+</t[dh]>
replace: pandex_index_cell_header
2 changes: 2 additions & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ pytest-runner>=5.1
pandas>=0.25.1
pandas_flavor>=0.1.2
humanize>=0.5.0
nbval==0.9.5
ipykernel==5.2.0
12 changes: 5 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[tox]
envlist = py27, py35, py36, py37 flake8
envlist = py34, py35, py36, py37

[travis]
python =
3.7: py37
3.6: py36
3.5: py35
2.7: py27
3.4: py34

[testenv:flake8]
basepython = python
Expand All @@ -18,10 +18,8 @@ setenv =
PYTHONPATH = {toxinidir}
deps =
-r{toxinidir}/requirements_dev.txt
; If you want to make tox run the tests with the same versions, create a
; requirements.txt with the pinned versions and uncomment the following line:
; -r{toxinidir}/requirements.txt

commands =
pip install -U pip
pytest --basetemp={envtmpdir}
python -m ipykernel install --name conda-root-py
pytest --nbval {toxinidir}/example/pandas_log_intro.ipynb --sanitize-with {toxinidir}/doc_sanitize.cfg -v

0 comments on commit 5135383

Please sign in to comment.