From ad469e4145d72c5d40d382d824aeeacbbebdd19a Mon Sep 17 00:00:00 2001 From: Jirka Date: Tue, 19 Mar 2024 19:23:00 +0100 Subject: [PATCH 1/2] ci: enable upload codecov statistics --- .azure/gpu-tests.yml | 24 ++++++++++++++++++++++++ .github/workflows/ci-testing.yml | 18 +++++++++--------- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/.azure/gpu-tests.yml b/.azure/gpu-tests.yml index 22ba01eddc..1a842d5f9f 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: From 405a230091583ceeb6e1b25f04cd61d92031fbcf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 21 Mar 2024 09:11:56 +0000 Subject: [PATCH 2/2] pre-commit: running and fixing... --- .azure/gpu-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure/gpu-tests.yml b/.azure/gpu-tests.yml index 1a842d5f9f..1bf99b0aaa 100644 --- a/.azure/gpu-tests.yml +++ b/.azure/gpu-tests.yml @@ -68,11 +68,11 @@ jobs: # 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 & ...'