Skip to content

Commit

Permalink
FIX: CODECOV Setup
Browse files Browse the repository at this point in the history
  • Loading branch information
syedhamidali committed Oct 13, 2024
1 parent af08e77 commit 8fa2eaa
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
with:
fetch-depth: 0
- name: Install micromamba environment
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-name: radarx-unit-tests
environment-file: ${{env.CONDA_ENV_FILE}}
Expand All @@ -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 All @@ -102,7 +100,7 @@ jobs:
with:
fetch-depth: 0
- name: Install micromamba environment
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-name: radarx-notebook-tests
environment-file: ${{env.CONDA_ENV_FILE}}
Expand All @@ -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 8fa2eaa

Please sign in to comment.