Skip to content

Commit c09e192

Browse files
authored
Merge pull request #151 from samjhill/feature/tests
add unit tests
2 parents 5cdb89a + 0275d29 commit c09e192

File tree

5 files changed

+1859
-2
lines changed

5 files changed

+1859
-2
lines changed

.github/workflows/pytest.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Run python unit tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.11'
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install pytest pytest-cov
28+
pip install -r requirements.txt
29+
30+
- name: Run tests with coverage
31+
run: |
32+
pytest --cov=./ --cov-report=xml
33+
34+
- name: Save coverage report
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: coverage-report
38+
path: coverage.xml

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
.vscode/launch.json
22
artifacts/*
33
venv
4-
.DS_Store
4+
.venv
5+
.DS_Store
6+
__pycache__

requirements.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
certifi==2024.7.4
22
charset-normalizer==3.0.1
3+
defusedxml==0.7.1
34
docutils==0.19
45
idna==3.7
6+
iniconfig==2.0.0
7+
packaging==24.1
8+
pluggy==1.5.0
9+
pytest==8.2.2
510
python-dateutil==2.8.2
611
requests==2.32.0
712
six==1.16.0
813
smmap==5.0.0
914
urllib3==1.26.19
10-
defusedxml==0.7.1

tests/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)