mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-21 16:34:32 +02:00
38 lines
971 B
YAML
38 lines
971 B
YAML
name: Calculate test coverage
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out repo
|
|
uses: actions/checkout@v4
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
cache: pip
|
|
cache-dependency-path: pyproject.toml
|
|
- name: Install SpatiaLite
|
|
run: sudo apt-get install libsqlite3-mod-spatialite
|
|
- name: Install Python dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install . --group dev
|
|
python -m pip install pytest-cov
|
|
- name: Run tests
|
|
run: |-
|
|
ls -lah
|
|
pytest --cov=sqlite_utils --cov-report xml:coverage.xml --cov-report term
|
|
ls -lah
|
|
- name: Upload coverage report
|
|
uses: codecov/codecov-action@v1
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
file: coverage.xml
|