Skip to content

Commit 38ad17e

Browse files
authored
feat: add codecov service (#59)
* feat: generate codecov XML report Signed-off-by: heitorlessa <lessa@amazon.co.uk> * feat: add codecov workflow Signed-off-by: heitorlessa <lessa@amazon.co.uk>
1 parent 0037efb commit 38ad17e

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/python_build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ jobs:
1717
max-parallel: 4
1818
matrix:
1919
python-version: [3.6, 3.7, 3.8]
20+
env:
21+
OS: ${{ matrix.os }}
22+
PYTHON: ${{ matrix.python-version }}
2023
steps:
2124
- uses: actions/checkout@v1
2225
- name: Set up Python ${{ matrix.python-version }}
@@ -33,3 +36,11 @@ jobs:
3336
run: make security-baseline
3437
- name: Complexity baseline
3538
run: make complexity-baseline
39+
- name: Upload coverage to Codecov
40+
uses: codecov/codecov-action@v1
41+
with:
42+
file: ./coverage.xml
43+
# flags: unittests
44+
env_vars: OS,PYTHON
45+
name: aws-lambda-powertools-python-codecov
46+
fail_ci_if_error: true

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ lint: format
1818
poetry run flake8
1919

2020
test:
21-
poetry run pytest -vvv
21+
poetry run pytest -vvv --cov=./ --cov-report=xml
2222

2323
coverage-html:
2424
poetry run pytest --cov-report html

0 commit comments

Comments
 (0)