mirror of
https://github.com/dw-0/kiauh.git
synced 2026-08-03 04:47:56 +05:00
Add GitHub Actions workflow for running tests with coverage on Python 3.8 and 3.11. Configure pytest-cov, coverage thresholds and expand testpaths in pyproject.toml. Update .gitignore for .ruff_cache, .mypy_cache, *.egg-info and .coverage.
37 lines
803 B
YAML
37 lines
803 B
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [develop, master]
|
|
pull_request:
|
|
branches: [develop, master]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.8", "3.11"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -e ".[dev]"
|
|
|
|
- name: Run tests with coverage
|
|
run: pytest --cov=kiauh --cov-report=xml --cov-report=term
|
|
|
|
- name: Upload coverage
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: coverage-${{ matrix.python-version }}
|
|
path: coverage.xml
|