Skip to content

Commit

Permalink
update codecov config
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis committed Mar 31, 2024
1 parent 7c36750 commit 531cd43
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 14 deletions.
12 changes: 12 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[run]
omit =
sunkit_iamge/cython_version*
sunkit_iamge/extern/*
sunkit_iamge/version*
sunkit_iamge/data/sample.py
sunkit_iamge/data/_sample.py
*/sunkit_iamge/cython_version*
*/sunkit_iamge/extern/*
*/sunkit_iamge/version*
*/sunkit_iamge/data/sample.py
*/sunkit_iamge/data/_sample.py
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
posargs: -n auto
envs: |
- linux: py312
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

test:
needs: [core]
Expand All @@ -42,6 +44,8 @@ jobs:
- macos: py310
- windows: py311
- linux: py310-oldestdeps
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

docs:
needs: [test]
Expand Down Expand Up @@ -69,6 +73,8 @@ jobs:
posargs: -n auto --dist loadgroup
envs: |
- linux: py312-online
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

devdeps:
needs: [online]
Expand All @@ -80,6 +86,8 @@ jobs:
posargs: -n auto
envs: |
- linux: py312-devdeps
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

conda:
needs: [online]
Expand Down
8 changes: 5 additions & 3 deletions .codecov.yaml → codecov.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
codecov:
token: c78028e5-8778-47c6-97af-94b0bb99fc9a
comment: off
comment: false
coverage:
status:
project:
default:
threshold: 0.2%
codecov:
require_ci_to_pass: false
notify:
wait_for_ci: true
3 changes: 1 addition & 2 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[pytest]
minversion = 7.0
testpaths = "sunkit_image" "docs"
norecursedirs = ".tox" "build" "docs[\/]_build" "docs[\/]generated" "*.egg-info" "examples" "sunkit_image[/\]_dev" ".jupyter" ".history" "tools" "sunkit_image[\/]extern"
doctest_plus = enabled
Expand All @@ -11,8 +12,6 @@ markers =
online: marks this test function as needing online connectivity.
mpl_image_compare: marks this test function as using hash-based Matplotlib figure verification. This mark is not meant to be directly applied, but is instead automatically applied when a test function uses the @sunpy.tests.helpers.figure_test decorator.
remote_data_strict = True
# Pin junit behaviour; we might want to update this to xunit2 at some point
junit_family=xunit1
filterwarnings =
error
# Do not fail on pytest config issues (i.e. missing plugins) but do show them
Expand Down
11 changes: 2 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,15 @@ description =
setenv =
MPLBACKEND = agg
COLUMNS = 180
PYTEST_COMMAND = pytest -vvv -ra --pyargs sunkit_image --cov-report=xml --cov=sunkit_image {toxinidir}/docs
PYTEST_COMMAND = pytest -vvv -r fEs --pyargs sunkit_image --cov-report=xml --cov=sunkit_image --cov-config={toxinidir}/.coveragerc {toxinidir}/docs
SUNPY_SAMPLEDIR = {env:SUNPY_SAMPLEDIR:{toxinidir}/.tox/{envname}/sample_data/}
passenv =
HTTP_PROXY
HTTPS_PROXY
NO_PROXY
CIRCLECI
deps =
devdeps: git+https://github.com/scikit-image/scikit-image.git
devdeps: git+https://github.com/sunpy/sunpy.git
oldestdeps: sunpy<6.0
oldestdeps: scikit-image<0.20.0
oldestdeps: scipy<1.19.0
oldestdeps: numpy<1.23.0
online: pytest-rerunfailures
online: pytest-timeout
figure-!devdeps: astropy==5.3.1
figure-!devdeps: matplotlib==3.7.2
figure-!devdeps: sunpy==5.0.0
Expand All @@ -51,7 +44,7 @@ commands =
!figure: pip freeze --all --no-input
# We have online figure tests we don't want to run.
!online-!figure: {env:PYTEST_COMMAND} {posargs}
online: {env:PYTEST_COMMAND} --reruns 2 --timeout=180 --remote-data=any {posargs}
online: {env:PYTEST_COMMAND} --remote-data=any {posargs}
figure: /bin/bash -c "mkdir -p ./figure_test_images; python -c 'import matplotlib as mpl; print(mpl.ft2font.__file__, mpl.ft2font.__freetype_version__, mpl.ft2font.__freetype_build_type__)' > ./figure_test_images/figure_version_info.txt"
figure: /bin/bash -c "pip freeze --all --no-input >> ./figure_test_images/figure_version_info.txt"
figure: /bin/bash -c "cat ./figure_test_images/figure_version_info.txt"
Expand Down

0 comments on commit 531cd43

Please sign in to comment.