Skip to content

Commit

Permalink
Merge pull request #85 from python-astrodynamics/feature/codecov
Browse files Browse the repository at this point in the history
Upload coverage to codecov
  • Loading branch information
RazerM authored Aug 1, 2024
2 parents 51b856c + 255028d commit 985f051
Showing 1 changed file with 6 additions and 31 deletions.
37 changes: 6 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,39 +33,14 @@ jobs:
- name: "Run tox targets for ${{ matrix.python-version }}"
run: "python -m tox -- -v"

- name: "Upload coverage data"
uses: "actions/upload-artifact@v3"
with:
name: coverage-data
path: .coverage.*
if-no-files-found: ignore

coverage:
name: "Coverage Report"
runs-on: "ubuntu-latest"
needs: "tests"

steps:
- uses: "actions/checkout@v4"
- uses: "actions/setup-python@v5"
with:
# Use latest Python, so it understands all syntax.
python-version: "3.12"

- run: "python -m pip install --upgrade coverage[toml]"

- uses: "actions/download-artifact@v3"
with:
name: "coverage-data"

- name: "Combine coverage"
- name: "Convert coverage"
run: |
python -m coverage combine
python -m coverage html
python -m coverage report
python -m coverage xml
- name: "Upload HTML report"
uses: "actions/upload-artifact@v3"
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
with:
name: "html-report"
path: "htmlcov"
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 985f051

Please sign in to comment.