Add Codecov and GitHub action

This commit is contained in:
Jeremy Singer-Vine
2020-07-25 10:01:44 -04:00
parent 59f7b50540
commit b148fd1b5d
3 changed files with 39 additions and 1 deletions
+37
View File
@@ -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
+1 -1
View File
@@ -11,4 +11,4 @@ venv:
${PIP} install -e .
tests:
${PYTHON} -m pytest
${PYTHON} -m pytest --cov=pdfplumber --cov-config=.coveragerc --cov-report xml:coverage.xml --cov-report term
+1
View File
@@ -1,2 +1,3 @@
pandas>=1.0.0
pytest
pytest-cov