Skip to content

Commit

Permalink
Merge pull request #40 from syedhamidali/update-imd
Browse files Browse the repository at this point in the history
FIX: CODECOV Setup
  • Loading branch information
syedhamidali authored Oct 13, 2024
2 parents ddec6b8 + 8fa2eaa commit 435c010
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,27 +61,25 @@ jobs:
- name: Install coverage via pip # ADD THIS STEP TO INSTALL COVERAGE
run: |
python -m pip install coverage
python -m pip install pytest-cov
python -m pip install pytest-xdist
python -m pip install coverage pytest-cov pytest-xdist
- name: Install radarx
run: |
python -m pip install . --no-deps
- name: Version Info
run: |
python -c "import radarx; print(radarx.version.version)"
- name: Test with pytest and collect coverage
- name: Test with pytest
run: |
pytest -n auto --dist loadfile --verbose --durations=15 --cov=radarx --cov-report=xml --cov-report=term-missing tests/ > coverage_unit.xml
pytest -n auto --dist loadfile --verbose --durations=15 --cov-report xml:coverage_unit.xml --cov=radarx --pyargs tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: coverage_unit.xml
file: ./coverage_unit.xml
flags: unittests
env_vars: RUNNER_OS,PYTHON_VERSION
name: codecov-gha
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN}}

build_1:
name: radarx notebook tests - linux
Expand Down Expand Up @@ -112,26 +110,27 @@ jobs:
python=${{matrix.python-version}}
numpy=${{matrix.numpy-version}}
conda
- name: Install coverage and pytest via pip
run: |
python -m pip install coverage pytest-cov pytest-xdist nbval
- name: Install radarx
run: |
python -m pip install . --no-deps
- name: Version Info
run: |
python -c "import radarx; print(radarx.version.version)"
# - name: Test with pytest
# run: |
# pytest -n auto --dist loadfile --verbose --durations=15 --cov-report xml:coverage_notebook.xml --cov=radarx --pyargs examples/notebooks
- name: Test with pytest and collect coverage
- name: Test with pytest
run: |
pytest --nbval --verbose --durations=15 --cov=radarx --cov-report=xml --cov-report=term-missing examples/notebooks > coverage_notebook.xml
pytest --nbval --verbose --durations=15 --cov=radarx --cov-report=xml:coverage_notebook.xml --cov-report=term-missing examples/notebooks
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: coverage_notebook.xml
file: ./coverage_notebook.xml
flags: notebooktests
env_vars: RUNNER_OS,PYTHON_VERSION
name: codecov-gha
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN}}

test_build_distribution_testpypi:
name: test build distribution for testpypi
Expand Down

0 comments on commit 435c010

Please sign in to comment.