Skip to content

Commit 8c36b54

Browse files
committed
Added code coverage report uploads to codecov.io
1 parent 6e85276 commit 8c36b54

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

.github/workflows/coverage.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: coverage
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
if: "!contains(github.event.pull_request.labels.*.name, 'docs-only')"
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest]
18+
python: ["3.12"]
19+
20+
steps:
21+
- uses: compas-dev/compas-actions.build@v4
22+
with:
23+
invoke_lint: false
24+
invoke_test: false
25+
python: ${{ matrix.python }}
26+
- name: Run tests collecting coverage reports
27+
run: pytest --cov src/compas --cov-report=html
28+
- name: Upload coverage reports to Codecov
29+
uses: codecov/[email protected]
30+
with:
31+
token: ${{ secrets.CODECOV_TOKEN }}

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12+
* Added code coverage report uploads to codecov.io.
13+
1214
### Changed
1315

1416
* Fixed bug in `compas.geometry.curves.curve.Curve.reversed` by adding missing parenthesis.

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ black >=22.12.0
33
bump-my-version
44
compas_invocations2
55
invoke >=0.14
6+
pytest-cov
67
ruff
78
sphinx_compas2_theme
89
twine

0 commit comments

Comments
 (0)