Skip to content

Commit

Permalink
ci: codecov setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrus committed Apr 7, 2020
1 parent 3312758 commit bb7ab11
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[run]
source=suffix-trees
omit=suffix_trees/test/*
13 changes: 10 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:

lint:
test:
# NOTE: This name appears in GitHub's Checks API.
name: lint
runs-on: ubuntu-latest
Expand All @@ -39,11 +39,18 @@ jobs:
if: always()
- name: Run tests
run: |
pytest
pytest --cov=suffix_trees/
# Always run this step so that all linting errors can be seen at once.
if: always()
- name: Generate and run test vectors
# TODO: could cache the gen_vectors.py result.
run: |
python3 suffix_trees/test/gen_vectors.py
SUFFIX_TREES_TEST_VECTORS=1 pytest suffix_trees/test/test_vectors.py
SUFFIX_TREES_TEST_VECTORS=1 pytest --cov=suffix_trees/ --cov-append suffix_trees/test/test_vectors.py
- name: Upload coverage
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
codecov
# Only run matrix if previous jobs are succesful and with Python version 3.8.
if: success() && matrix.python-version == 3.8
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# suffix_trees

![ci](https://github.com/ptrus/suffix-trees/workflows/ci/badge.svg)
[![codecov](https://codecov.io/gh/ptrus/suffix-trees/branch/master/graph/badge.svg)](https://codecov.io/gh/ptrus/suffix-trees)

Python implementation of Suffix Trees and Generalized Suffix Trees. Also provided methods with typcal applications of STrees and GSTrees.

Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
codecov
flake8
hypothesis
pypandoc
pytest
pytest-cov

0 comments on commit bb7ab11

Please sign in to comment.