Skip to content

Commit 0015999

Browse files
feat: add code coverage reporting (#22)
* Add code coverage * update dependency * Update codecov.yml * Update codecov.yml
1 parent 951e0ad commit 0015999

2 files changed

Lines changed: 13 additions & 14 deletions

File tree

.github/workflows/codecov.yml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,26 @@ on:
66
pull_request:
77

88
jobs:
9-
build:
9+
run:
1010
runs-on: ubuntu-latest
11-
timeout-minutes: 10
12-
strategy:
13-
matrix:
14-
python-version: ["3.12"]
11+
timeout-minutes: 5
1512
steps:
1613
- uses: actions/checkout@v4
17-
- name: Set up Python ${{ matrix.python-version }}
14+
- name: Set up Python
1815
uses: actions/setup-python@v5
1916
with:
20-
python-version: ${{ matrix.python-version }}
17+
python-version: 3.12
2118
- name: Install dependencies
2219
run: |
2320
pip install -U pip
24-
pip install .
21+
pip install -r requirements.txt
2522
pip install -r requirements/testing.txt
2623
- name: Run all tests for codecov
2724
run: |
2825
pytest --cov=./slack_cli_hooks/ --cov-report=xml
29-
# TODO uncomment when repo public
30-
# - name: Upload coverage to Codecov
31-
# uses: codecov/codecov-action@v3
32-
# with:
33-
# fail_ci_if_error: true
34-
# verbose: true
26+
- name: Upload coverage to Codecov
27+
uses: codecov/codecov-action@v3
28+
with:
29+
token: ${{ secrets.CODECOV_TOKEN }}
30+
fail_ci_if_error: true
31+
verbose: true

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<img alt="PyPI - Version" src="https://img.shields.io/pypi/v/slack-cli-hooks?style=flat-square"></a>
66
<a href="https://pypi.org/project/slack-cli-hooks/">
77
<img alt="Python Versions" src="https://img.shields.io/pypi/pyversions/slack-cli-hooks.svg?style=flat-square"></a>
8+
<a href="https://codecov.io/gh/slackapi/python-slack-hooks">
9+
<img alt="Codecov" src="https://img.shields.io/codecov/c/gh/slackapi/python-slack-hooks?style=flat-square"></a>
810
</p>
911

1012
This library defines the contract between the

0 commit comments

Comments
 (0)