add tests

This commit is contained in:
Sam Hill 2024-07-18 16:46:49 -04:00
parent 5cdb89a41d
commit 5d79c909eb
5 changed files with 1857 additions and 2 deletions

36
.github/workflows/pytest.yml vendored Normal file
View file

@ -0,0 +1,36 @@
name: Run python unit tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov
pip install -r requirements.txt
- name: Run tests with coverage
run: |
pytest --cov=./ --cov-report=xml
- name: Save coverage report
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: coverage.xml

4
.gitignore vendored
View file

@ -1,4 +1,6 @@
.vscode/launch.json
artifacts/*
venv
.DS_Store
.venv
.DS_Store
__pycache__

View file

@ -1,10 +1,14 @@
certifi==2024.7.4
charset-normalizer==3.0.1
defusedxml==0.7.1
docutils==0.19
idna==3.7
iniconfig==2.0.0
packaging==24.1
pluggy==1.5.0
pytest==8.2.2
python-dateutil==2.8.2
requests==2.32.0
six==1.16.0
smmap==5.0.0
urllib3==1.26.19
defusedxml==0.7.1

0
tests/__init__.py Normal file
View file

1813
tests/test_find_posts.py Normal file

File diff suppressed because it is too large Load diff