Skip to content

Commit 985f051

Browse files
authored
Merge pull request #85 from python-astrodynamics/feature/codecov
Upload coverage to codecov
2 parents 51b856c + 255028d commit 985f051

File tree

1 file changed

+6
-31
lines changed

1 file changed

+6
-31
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -33,39 +33,14 @@ jobs:
3333
- name: "Run tox targets for ${{ matrix.python-version }}"
3434
run: "python -m tox -- -v"
3535

36-
- name: "Upload coverage data"
37-
uses: "actions/upload-artifact@v3"
38-
with:
39-
name: coverage-data
40-
path: .coverage.*
41-
if-no-files-found: ignore
42-
43-
coverage:
44-
name: "Coverage Report"
45-
runs-on: "ubuntu-latest"
46-
needs: "tests"
47-
48-
steps:
49-
- uses: "actions/checkout@v4"
50-
- uses: "actions/setup-python@v5"
51-
with:
52-
# Use latest Python, so it understands all syntax.
53-
python-version: "3.12"
54-
55-
- run: "python -m pip install --upgrade coverage[toml]"
56-
57-
- uses: "actions/download-artifact@v3"
58-
with:
59-
name: "coverage-data"
60-
61-
- name: "Combine coverage"
36+
- name: "Convert coverage"
6237
run: |
6338
python -m coverage combine
64-
python -m coverage html
6539
python -m coverage report
40+
python -m coverage xml
6641
67-
- name: "Upload HTML report"
68-
uses: "actions/upload-artifact@v3"
42+
- name: "Upload coverage to Codecov"
43+
uses: codecov/codecov-action@v4
6944
with:
70-
name: "html-report"
71-
path: "htmlcov"
45+
fail_ci_if_error: true
46+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)