Skip to content

Commit

Permalink
ci: enable upload codecov statistics (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda authored Mar 22, 2024
1 parent 3492f14 commit 411df2d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 9 deletions.
24 changes: 24 additions & 0 deletions .azure/gpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,14 @@ jobs:
# drop pt from requirements so not to interfere with the existing one
bash .azure/remove-torch-lines.sh requirements/base.txt
cat requirements/base.txt
# double check on test requirements
pip install -r requirements/test.txt
# https://docs.codecov.com/docs/codecov-uploader
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
# install this package
python setup.py develop
displayName: 'Install package & ...'
Expand All @@ -85,6 +91,12 @@ jobs:
--durations=250 \
--numprocesses=9 \
--ignore=thunder/tests/distributed --ignore=thunder/tests/test_networks.py
# compile coverage results
python -m coverage report
python -m coverage xml
# upload to codecov
./codecov --token=$(CODECOV_TOKEN) --commit=$(Build.SourceVersion) \
--flags=gpu,pytest,regular --name="GPU-coverage" --env=linux,azure
condition: ne(variables['testing'], 'distributed')
displayName: 'Testing: regular'
Expand All @@ -95,6 +107,12 @@ jobs:
thunder/tests/test_networks.py \
-m "not standalone" \
-v --random-order-seed=42 --durations=0 --numprocesses=3
# compile coverage results
python -m coverage report
python -m coverage xml
# upload to codecov
./codecov --token=$(CODECOV_TOKEN) --commit=$(Build.SourceVersion) \
--flags=gpu,pytest,networks --name="GPU-coverage" --env=linux,azure
condition: ne(variables['testing'], 'distributed')
displayName: 'Testing: networks'
Expand All @@ -108,6 +126,12 @@ jobs:
- bash: |
# run all found tests in given past as standalone
bash scripts/run_standalone_tests.sh "thunder/tests/distributed"
# compile coverage results
python -m coverage report
python -m coverage xml
# upload to codecov
./codecov --token=$(CODECOV_TOKEN) --commit=$(Build.SourceVersion) \
--flags=gpu,pytest,distributed --name="GPU-coverage" --env=linux,azure
condition: eq(variables['testing'], 'distributed')
displayName: 'Testing: distributed'
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@ jobs:
coverage report
coverage xml
#- name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# file: ./coverage.xml
# flags: unittests
# env_vars: OS,PYTHON
# name: codecov-umbrella
# fail_ci_if_error: false
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false


testing-guardian:
Expand Down

0 comments on commit 411df2d

Please sign in to comment.