Skip to content

Commit

Permalink
Use codecov github action for uploading coverage (#2406)
Browse files Browse the repository at this point in the history
Summary:
Replicates pytorch/botorch#2312

Codecov bash uploader is marked for deprecation: https://docs.codecov.com/docs/about-the-codecov-bash-uploader
Switching the CI to use the codecov github action with the newly added upload token: https://github.com/marketplace/actions/codecov

Pull Request resolved: #2406

Test Plan: Check for successful upload in CI signals

Reviewed By: dme65

Differential Revision: D56713216

Pulled By: saitcakmak

fbshipit-source-id: c5d70e0d4a362e61788ed54b73605786bd5b4f08
  • Loading branch information
saitcakmak authored and facebook-github-bot committed Apr 29, 2024
1 parent 853b340 commit 1be47e1
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
uses: ./.github/workflows/reusable_test.yml
with:
pinned_botorch: false
secrets: inherit

lint:

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ jobs:
with:
pinned_botorch: false
minimal_dependencies: true
secrets: inherit

tests-and-coverage-full:
name: Tests with latest BoTorch & full dependencies
uses: ./.github/workflows/reusable_test.yml
with:
pinned_botorch: false
minimal_dependencies: false
secrets: inherit

build-tutorials:
name: Build tutorials with latest BoTorch
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cron_pinned.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ jobs:
with:
pinned_botorch: true
minimal_dependencies: true
secrets: inherit

tests-and-coverage-full:
name: Tests with pinned BoTorch & full dependencies
uses: ./.github/workflows/reusable_test.yml
with:
pinned_botorch: true
minimal_dependencies: false
secrets: inherit

build-tutorials:
name: Build tutorials with pinned BoTorch
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ jobs:
uses: ./.github/workflows/reusable_test.yml
with:
pinned_botorch: false
secrets: inherit

tests-and-coverage-pinned:
name: Tests with pinned BoTorch
uses: ./.github/workflows/reusable_test.yml
with:
pinned_botorch: true
secrets: inherit

publish-stable-website:

Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/reusable_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ jobs:
name: Tests and coverage
run: |
pytest -ra --cov=ax
- if: ${{ !inputs.minimal_dependencies }}
# Using same condition as above since we need the coverage report for upload.
- if: ${{ !inputs.minimal_dependencies && matrix.python-version == 3.10 }}
# Only upload codecov once per workflow.
name: Upload coverage
run: |
bash <(curl -s https://codecov.io/bash)
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 1be47e1

Please sign in to comment.