Skip to content

Commit

Permalink
Add Codecov and GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
jsvine committed Jul 25, 2020
1 parent 59f7b50 commit b148fd1
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pandas>=1.0.0
pytest
pytest-cov

0 comments on commit b148fd1

Please sign in to comment.