Skip to content

Commit

Permalink
build: Use coverage directly, instead of pytest-cov. Restore pre-comm…
Browse files Browse the repository at this point in the history
…it requirement. ci: Use official coveralls action.
  • Loading branch information
jpmckinney committed Sep 7, 2024
1 parent 3d42ecd commit 73c66d9
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 25 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,8 @@ jobs:
TEST_URL: http://localhost:${{ job.services.httpbin.ports[8080] }}
# For requests.get() in pelican.util.codelists._get() (from unittest tests).
run: |
pytest -W error -W ignore::ResourceWarning -rs \
--cov contracting_process \
--cov dataset \
--cov manage \
--cov pelican \
--cov time_variance \
--cov workers
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls --service=github
coverage run --source=contracting_process,dataset,manage,pelican,time_variance,workers -m pytest -W error -W ignore::ResourceWarning -rs
- uses: coverallsapp/github-action@v2
services:
postgres:
image: postgres:12
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ repos:
- id: pip-compile
name: pip-compile requirements_dev.in
args: [requirements_dev.in, -o, requirements_dev.txt]
files: ^requirements_dev\.(in|txt)$
files: ^requirements(_dev)?\.(in|txt)$
4 changes: 2 additions & 2 deletions requirements_dev.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
-r requirements.txt
coveralls
coverage
jsonschema
pre-commit
psycopg2-binary
pytest
pytest-cov
pytest-subtests
rfc3339-validator
rfc3986-validator
31 changes: 19 additions & 12 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,22 @@ certifi==2024.7.4
# -r requirements.txt
# requests
# sentry-sdk
cfgv==3.4.0
# via pre-commit
charset-normalizer==3.1.0
# via
# -r requirements.txt
# requests
click==8.1.6
# via -r requirements.txt
coverage==6.5.0
# via
# coveralls
# pytest-cov
coveralls==3.3.1
# via -r requirements_dev.in
docopt==0.6.2
# via coveralls
distlib==0.3.8
# via virtualenv
filelock==3.15.4
# via virtualenv
identify==2.6.0
# via pre-commit
idna==3.7
# via
# -r requirements.txt
Expand All @@ -37,6 +39,8 @@ jsonref==1.0.0.post1
# via -r requirements.txt
jsonschema==4.17.3
# via -r requirements_dev.in
nodeenv==1.9.1
# via pre-commit
orjson==3.9.15
# via -r requirements.txt
packaging==23.1
Expand All @@ -47,8 +51,12 @@ pika==1.3.2
# via
# -r requirements.txt
# yapw
platformdirs==4.2.2
# via virtualenv
pluggy==0.12.0
# via pytest
pre-commit==3.8.0
# via -r requirements_dev.in
psycopg2==2.9.6
# via -r requirements.txt
psycopg2-binary==2.9.6
Expand All @@ -58,18 +66,15 @@ pyrsistent==0.18.0
pytest==7.2.0
# via
# -r requirements_dev.in
# pytest-cov
# pytest-subtests
pytest-cov==4.0.0
# via -r requirements_dev.in
pytest-subtests==0.5.0
# via -r requirements_dev.in
python-dateutil==2.8.0
# via -r requirements.txt
pyyaml==6.0.2
# via pre-commit
requests==2.32.3
# via
# -r requirements.txt
# coveralls
# via -r requirements.txt
rfc3339-validator==0.1.4
# via -r requirements_dev.in
rfc3986-validator==0.1.1
Expand All @@ -88,6 +93,8 @@ urllib3==2.2.2
# sentry-sdk
validate-email==1.3
# via -r requirements.txt
virtualenv==20.26.3
# via pre-commit
yapw==0.1.4
# via -r requirements.txt
zipp==3.19.1
Expand Down

0 comments on commit 73c66d9

Please sign in to comment.