Add coverage to CI workflow

This commit is contained in:
thePR0M3TH3AN
2025-06-29 15:20:05 -04:00
parent 02a0d4bf98
commit 786f2c2bc5
2 changed files with 18 additions and 3 deletions

View File

@@ -14,9 +14,23 @@ jobs:
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: '3.11' python-version: '3.11'
- name: Install dependencies - name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('src/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python dependencies
id: deps
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install -r src/requirements.txt pip install -r src/requirements.txt
- name: Test with pytest - name: Run tests with coverage
run: pytest -q src/tests run: |
pytest --cov=src --cov-report=xml --cov-report=term-missing src/tests
- name: Upload coverage report
uses: actions/upload-artifact@v3
with:
name: coverage-xml
path: coverage.xml

View File

@@ -9,4 +9,5 @@ aiohttp
bcrypt bcrypt
bip85 bip85
pytest>=7.0 pytest>=7.0
pytest-cov