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
22 changes: 12 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,18 @@ jobs:
git config --global user.email "you@example.com"
git config --global user.name "Your Name"

- run: poetry run pytest --cov=foxops_client
- name: Run tests with coverage
run: poetry run pytest --cov=foxops_client --cov-report=term --cov-config=pyproject.toml
env:
COVERAGE_FILE: .coverage.${{ matrix.python-version }}

- name: Upload coverage data
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-data
path: .coverage.*
if-no-files-found: ignore

name: coverage-data-${{ matrix.python-version }}
path: .coverage.${{ matrix.python-version }}
include-hidden-files: true
if-no-files-found: warn

coverage:
name: Combine & check coverage
Expand All @@ -117,16 +118,17 @@ jobs:
with:
python-version: ${{env.PYTHON_LATEST}}
- run: python -m pip install --upgrade coverage[toml]
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: coverage-data
pattern: "*"
merge-multiple: true
- name: Combine coverage & fail if it's <70%.
run: |
python -m coverage combine
python -m coverage html --skip-covered --skip-empty
python -m coverage report --fail-under=70
- name: Upload HTML report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: html-report
path: htmlcov
Expand Down Expand Up @@ -164,4 +166,4 @@ jobs:
with:
python-version: ${{ env.PYTHON_LATEST }}
- run: python -m pip install -e .
- run: python -c 'import foxops_client; print(foxops_client.__version__)'
- run: python -c 'import foxops_client; print(foxops_client.__version__)'
Loading
Loading