mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 17:34:32 +02:00
* Add SpatiaLite CLI helpers * Add docs for spaitalite helpers * Fix flake8 issues and add more detail on spatial types * Run cog and add some help text. * Use SpatiaLite when calculating coverage, refs #407 Co-authored-by: Simon Willison <swillison@gmail.com>
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
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@v2
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.9
|
|
- uses: actions/cache@v2
|
|
name: Configure pip caching
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-
|
|
- 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 -e .[test]
|
|
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
|