Skip to content

Commit

Permalink
CI enable codecov (#893)
Browse files Browse the repository at this point in the history
* CI enable codecov

* add upload step
  • Loading branch information
adrinjalali authored Jun 9, 2022
1 parent 3e8a06d commit 271ed15
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
31 changes: 23 additions & 8 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,15 @@ jobs:
- run: |
if [[ "${{ matrix.test_repository }}" == "Repository only" ]]
then
pytest -Werror::FutureWarning --log-cli-level=INFO -sv ./tests/test_repository.py -k RepositoryTest
pytest --cov -Werror::FutureWarning --log-cli-level=INFO -sv ./tests/test_repository.py -k RepositoryTest
else
pytest -Werror::FutureWarning --log-cli-level=INFO -sv ./tests/ -k 'not RepositoryTest'
pytest --cov -Werror::FutureWarning --log-cli-level=INFO -sv ./tests/ -k 'not RepositoryTest'
fi
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3

build_pytorch:
runs-on: ubuntu-latest
strategy:
Expand All @@ -67,7 +70,10 @@ jobs:
pip install --upgrade pip
pip install .[testing,torch]
- run: pytest -Werror::FutureWarning -sv ./tests/test_hubmixin*
- run: pytest --cov -Werror::FutureWarning -sv ./tests/test_hubmixin*

- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3

build_tensorflow:
runs-on: ubuntu-latest
Expand All @@ -89,8 +95,11 @@ jobs:
pip install --upgrade pip
pip install .[testing,tensorflow]
- run: pytest -Werror::FutureWarning -sv ./tests/test_keras*

- run: pytest --cov -Werror::FutureWarning -sv ./tests/test_keras*

- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3

build_fastai:
runs-on: ubuntu-latest
strategy:
Expand All @@ -110,7 +119,10 @@ jobs:
pip install --upgrade pip
pip install .[testing,fastai]
- run: pytest -Werror::FutureWarning -sv ./tests/test_fastai*
- run: pytest --cov -Werror::FutureWarning -sv ./tests/test_fastai*

- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3

tests_lfs:
runs-on: ubuntu-latest
Expand All @@ -132,4 +144,7 @@ jobs:
pip install --upgrade pip
pip install .[testing]
- run: RUN_GIT_LFS_TESTS=1 pytest -Werror::FutureWarning -sv ./tests/ -k "HfLargefilesTest"
- run: RUN_GIT_LFS_TESTS=1 pytest --cov -Werror::FutureWarning -sv ./tests/ -k "HfLargefilesTest"

- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
1 change: 1 addition & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
comment: false
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def get_version() -> str:

extras["testing"] = [
"pytest",
"pytest-cov",
"datasets",
"soundfile",
]
Expand Down

0 comments on commit 271ed15

Please sign in to comment.