Skip to content

Commit

Permalink
Add Local coverage checking.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Prescod committed Sep 19, 2022
1 parent 1832a50 commit 854c932
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 46 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ jobs:
runs-on: sfdc-ubuntu-latest
steps:
- uses: "actions/checkout@v2"
- run: |
git fetch --no-tags origin main
git switch main
git switch - # switch back to branch under test
- uses: "actions/setup-python@v1"
with:
python-version: "3.9"
Expand All @@ -55,7 +60,14 @@ jobs:
python -m pip install cumulusci
- name: Run Tests
run: python -m pytest
run: |
python -m coverage run -m pytest
coverage xml
coverage report
git branch -a
diff-cover coverage.xml --fail-under 100 --compare-branch=origin/main --diff-range-notation=.. --show-uncovered --markdown-report coverage.md
echo "== Coverage ==" >> $GITHUB_STEP_SUMMARY
cat coverage.md >> $GITHUB_STEP_SUMMARY
faker_docs:
name: Faker Docs
Expand Down
1 change: 1 addition & 0 deletions requirements/dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
black
coverage
coveralls
diff-cover
mkdocs<1.3.0 # need to change Snowfakery monkey-patching before upgrade
mkdocs-exclude-search
pre-commit
Expand Down
80 changes: 45 additions & 35 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@
#
# pip-compile --allow-unsafe requirements/dev.in
#
attrs==21.4.0
attrs==22.1.0
# via
# jsonschema
# pytest
black==22.3.0
black==22.8.0
# via -r requirements/dev.in
certifi==2021.10.8
certifi==2022.9.14
# via
# -r requirements/prod.txt
# requests
cfgv==3.3.1
# via pre-commit
charset-normalizer==2.0.12
chardet==5.0.0
# via diff-cover
charset-normalizer==2.1.1
# via
# -r requirements/prod.txt
# requests
Expand All @@ -25,57 +27,60 @@ click==8.1.3
# -r requirements/prod.txt
# black
# mkdocs
coverage[toml]==6.3.2
coverage[toml]==6.4.4
# via
# -r requirements/dev.in
# coveralls
# pytest-cov
coveralls==3.3.1
# via -r requirements/dev.in
distlib==0.3.4
diff-cover==6.5.1
# via -r requirements/dev.in
distlib==0.3.6
# via virtualenv
docopt==0.6.2
# via coveralls
faker==12.3.3
faker==14.2.0
# via
# -r requirements/prod.txt
# faker-microservice
faker-microservice==2.0.0
# via -r requirements/dev.in
filelock==3.6.0
filelock==3.8.0
# via
# tox
# virtualenv
ghp-import==2.1.0
# via mkdocs
greenlet==1.1.2
greenlet==1.1.3
# via
# -r requirements/prod.txt
# sqlalchemy
gvgen==1.0
# via -r requirements/prod.txt
identify==2.5.0
identify==2.5.5
# via pre-commit
idna==3.3
idna==3.4
# via
# -r requirements/prod.txt
# requests
# yarl
importlib-metadata==4.11.3
importlib-metadata==4.12.0
# via
# markdown
# mkdocs
importlib-resources==5.7.1
importlib-resources==5.9.0
# via tox-gh-actions
iniconfig==1.1.1
# via pytest
jinja2==2.11.3
# via
# -r requirements/prod.txt
# diff-cover
# mkdocs
jsonschema==4.5.1
jsonschema==4.16.0
# via -r requirements/dev.in
markdown==3.3.7
markdown==3.4.1
# via mkdocs
markupsafe==2.0.1
# via
Expand All @@ -93,36 +98,39 @@ multidict==6.0.2
# via yarl
mypy-extensions==0.4.3
# via black
nodeenv==1.6.0
nodeenv==1.7.0
# via pre-commit
packaging==21.3
# via
# mkdocs
# pytest
# tox
pathspec==0.9.0
pathspec==0.10.1
# via black
platformdirs==2.5.2
# via
# black
# virtualenv
pluggy==1.0.0
# via
# diff-cover
# pytest
# tox
pre-commit==2.19.0
pre-commit==2.20.0
# via -r requirements/dev.in
py==1.11.0
# via
# pytest
# tox
pydantic==1.9.0
pydantic==1.10.2
# via -r requirements/prod.txt
pygments==2.13.0
# via diff-cover
pyparsing==3.0.9
# via packaging
pyrsistent==0.18.1
# via jsonschema
pytest==7.1.2
pytest==7.1.3
# via
# -r requirements/dev.in
# pytest-cov
Expand All @@ -147,64 +155,66 @@ pyyaml==6.0
# vcrpy
pyyaml-env-tag==0.1
# via mkdocs
requests==2.27.1
requests==2.28.1
# via
# -r requirements/prod.txt
# coveralls
# responses
responses==0.20.0
responses==0.21.0
# via -r requirements/dev.in
six==1.16.0
# via
# -r requirements/prod.txt
# python-dateutil
# tox
# vcrpy
# virtualenv
sqlalchemy==1.4.36
sqlalchemy==1.4.41
# via -r requirements/prod.txt
toml==0.10.2
# via
# pre-commit
# tox
# via pre-commit
tomli==2.0.1
# via
# black
# coverage
# pytest
tox==3.25.0
# tox
tox==3.26.0
# via
# -r requirements/dev.in
# tox-gh-actions
tox-gh-actions==2.9.1
# via -r requirements/dev.in
typeguard==2.10.0
# via -r requirements/dev.in
typing-extensions==4.2.0
typing-extensions==4.3.0
# via
# -r requirements/prod.txt
# black
# pydantic
urllib3==1.26.9
urllib3==1.26.12
# via
# -r requirements/prod.txt
# requests
# responses
vcrpy==4.1.1
vcrpy==4.2.1
# via
# -r requirements/dev.in
# pytest-vcr
virtualenv==20.14.1
virtualenv==20.16.5
# via
# pre-commit
# tox
watchdog==2.1.7
watchdog==2.1.9
# via mkdocs
wrapt==1.14.1
# via vcrpy
yarl==1.7.2
yarl==1.8.1
# via vcrpy
zipp==3.8.0
zipp==3.8.1
# via
# importlib-metadata
# importlib-resources

# The following packages are considered to be unsafe in a requirements file:
setuptools==65.3.0
# via nodeenv
20 changes: 10 additions & 10 deletions requirements/prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@
#
# pip-compile --allow-unsafe requirements/prod.in
#
certifi==2021.10.8
certifi==2022.9.14
# via requests
charset-normalizer==2.0.12
charset-normalizer==2.1.1
# via requests
click==8.1.3
# via -r requirements/prod.in
faker==12.3.3
faker==14.2.0
# via -r requirements/prod.in
greenlet==1.1.2
greenlet==1.1.3
# via sqlalchemy
gvgen==1.0
# via -r requirements/prod.in
idna==3.3
idna==3.4
# via requests
jinja2==2.11.3
# via -r requirements/prod.in
markupsafe==2.0.1
# via
# -r requirements/prod.in
# jinja2
pydantic==1.9.0
pydantic==1.10.2
# via -r requirements/prod.in
python-baseconv==1.2.2
# via -r requirements/prod.in
Expand All @@ -34,13 +34,13 @@ python-dateutil==2.8.2
# faker
pyyaml==6.0
# via -r requirements/prod.in
requests==2.27.1
requests==2.28.1
# via -r requirements/prod.in
six==1.16.0
# via python-dateutil
sqlalchemy==1.4.36
sqlalchemy==1.4.41
# via -r requirements/prod.in
typing-extensions==4.2.0
typing-extensions==4.3.0
# via pydantic
urllib3==1.26.9
urllib3==1.26.12
# via requests

0 comments on commit 854c932

Please sign in to comment.