mirror of
https://github.com/jsvine/pdfplumber.git
synced 2026-08-29 08:34:23 +08:00
Add Codecov and GitHub action
This commit is contained in:
@@ -0,0 +1,37 @@
|
|||||||
|
name: Tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
- push
|
||||||
|
- pull_request
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Install ghostscript libmagickwand-dev
|
||||||
|
run: sudo apt-get install libxml2-utils
|
||||||
|
- name: Remove policy.xml
|
||||||
|
run: sudo rm /etc/ImageMagick-6/policy.xml
|
||||||
|
- name: Check out repo
|
||||||
|
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 -r requirements.txt
|
||||||
|
python -m pip install -r requirements-dev.txt
|
||||||
|
python -m pip install -e .
|
||||||
|
- name: Run tests
|
||||||
|
run: |-
|
||||||
|
pytest --cov=pdfplumber --cov-config=.coveragerc --cov-report xml:coverage.xml --cov-report term
|
||||||
|
- name: Codecov
|
||||||
|
uses: codecov/codecov-action@v1.0.12
|
||||||
@@ -11,4 +11,4 @@ venv:
|
|||||||
${PIP} install -e .
|
${PIP} install -e .
|
||||||
|
|
||||||
tests:
|
tests:
|
||||||
${PYTHON} -m pytest
|
${PYTHON} -m pytest --cov=pdfplumber --cov-config=.coveragerc --cov-report xml:coverage.xml --cov-report term
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
pandas>=1.0.0
|
pandas>=1.0.0
|
||||||
pytest
|
pytest
|
||||||
|
pytest-cov
|
||||||
|
|||||||
Reference in New Issue
Block a user