Skip to content

Commit

Permalink
Add coverage CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jdeschamps committed Sep 20, 2024
1 parent b149f8d commit a12ef47
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 8 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,10 @@ jobs:
run: |
python -m pip install -U pip
# if running a cron job, we add the --pre flag to test against pre-releases
python -m pip install -e ".[dev]" ${{ github.event_name == 'schedule' && '--pre' || '' }}
python -m pip install ".[dev]" ${{ github.event_name == 'schedule' && '--pre' || '' }}
- name: 🧪 Run Tests
run: pytest --color=yes --cov --cov-config=pyproject.toml --cov-report=xml --cov-report=term-missing

- name: Coverage
uses: codecov/codecov-action@v3
with:
version: v0.7.3
run: pytest

deploy:
name: Release
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Coverage

on:
push:
branches:
- main
tags:
- "v*"
pull_request:

jobs:

test:
name: ${{ matrix.platform }} (${{ matrix.python-version }})
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
platform: [ubuntu-latest]

steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v3

- name: 🐍 Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache-dependency-path: "pyproject.toml"
cache: "pip"

- name: Install Dependencies
run: |
python -m pip install -U pip
python -m pip install -e ".[dev]"
- name: 🧪 Run Tests
run: pytest --color=yes --cov --cov-config=pyproject.toml --cov-report=xml --cov-report=term-missing

- name: Coverage
uses: codecov/codecov-action@v3
with:
version: v0.7.3
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
[![codecov](https://codecov.io/gh/juglab/MicroSSIM/branch/main/graph/badge.svg)](https://codecov.io/gh/juglab/MicroSSIM)



MicroSSIM is an image measure aimed at addressing the shortcomings of the Structural
Similarity Index Measure (SSIM), in particular in the context of microscopy images. Indeed,
in microscopy, degraded images (e.g. lower signal to noise ratio) often have a different
Expand Down

0 comments on commit a12ef47

Please sign in to comment.