Skip to content

Commit d1f7dc2

Browse files
committed
add badge
1 parent d68c9ca commit d1f7dc2

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.github/workflows/run_tests.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Execute all tests
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
66
run-tests:
@@ -9,7 +9,7 @@ jobs:
99

1010
steps:
1111
- uses: actions/checkout@v3
12-
- uses: actions/setup-python@v1
12+
- uses: actions/setup-python@v4
1313
with:
1414
python-version: "3.10"
1515

@@ -20,3 +20,15 @@ jobs:
2020
2121
- name: Run unit tests
2222
run: python -m pytest tests -m "not slow"
23+
24+
- name: Run unit tests with coverage
25+
run: |
26+
coverage run --source=effector -m pytest tests -m "not slow"
27+
coverage report -m
28+
coverage xml
29+
30+
- name: Upload coverage to Codecov
31+
uses: codecov/codecov-action@v4
32+
with:
33+
files: ./coverage.xml
34+
fail_ci_if_error: true

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
[![PyPI version](https://badge.fury.io/py/effector.svg?icon=si%3Apython)](https://badge.fury.io/py/effector)
88
![Execute Tests](https://github.com/givasile/effector/actions/workflows/run_tests.yml/badge.svg)
9+
[![codecov](https://codecov.io/gh/givasile/effector/branch/main/graph/badge.svg)](https://codecov.io/gh/givasile/effector)
910
![Publish Documentation](https://github.com/givasile/effector/actions/workflows/publish_documentation.yml/badge.svg)
1011
[![PyPI Downloads](https://static.pepy.tech/badge/effector)](https://pepy.tech/projects/effector)
1112
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)

0 commit comments

Comments
 (0)