mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
parent
80c18a18fc
commit
cf7a2bdb40
1 changed files with 41 additions and 0 deletions
41
.github/workflows/test-coverage.yml
vendored
Normal file
41
.github/workflows/test-coverage.yml
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
name: Calculate test coverage
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out datasette
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v1
|
||||||
|
with:
|
||||||
|
python-version: 3.8
|
||||||
|
- 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 -e .[test]
|
||||||
|
python -m pip install pytest-cov
|
||||||
|
- name: Run tests
|
||||||
|
run: |-
|
||||||
|
ls -lah
|
||||||
|
cat .coveragerc
|
||||||
|
pytest --cov=datasette --cov-config=.coveragerc --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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue