diff --git a/.azure/gpu-tests.yml b/.azure/gpu-tests.yml index 22ba01eddc..1bf99b0aaa 100644 --- a/.azure/gpu-tests.yml +++ b/.azure/gpu-tests.yml @@ -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 & ...' @@ -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' @@ -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' @@ -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' diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index cbd8fb2aa6..310279fbbd 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -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: