mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-09 18:14:09 +02:00
Enable codecov.io, refs #275
This commit is contained in:
parent
ca2b26130f
commit
276fc4297c
2 changed files with 50 additions and 0 deletions
42
.github/workflows/test-coverage.yml
vendored
Normal file
42
.github/workflows/test-coverage.yml
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
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 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
|
||||||
|
cat .coveragerc
|
||||||
|
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
|
||||||
8
codecov.yml
Normal file
8
codecov.yml
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
coverage:
|
||||||
|
status:
|
||||||
|
project:
|
||||||
|
default:
|
||||||
|
informational: true
|
||||||
|
patch:
|
||||||
|
default:
|
||||||
|
informational: true
|
||||||
Loading…
Add table
Add a link
Reference in a new issue