Skip to content

Commit

Permalink
[Fix] Make codecov action optional in workflows (#559)
Browse files Browse the repository at this point in the history
* make codecov action optional in workflows

* test env vs secret

* added CODECOV_TOKEN to optional

* fix typo
  • Loading branch information
kyzooghost authored Jan 16, 2025
1 parent fe967c7 commit 26ba22e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/coordinator-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN_RELEASE_ACCESS }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
runs-on: gha-runner-scale-set-ubuntu-22.04-amd64-large
name: Coordinator tests
steps:
Expand Down Expand Up @@ -76,6 +77,7 @@ jobs:
path: |
${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/jacocoRootReport.xml
- name: Upload coverage to Codecov
if: ${{ env.CODECOV_TOKEN != '' }}
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run-smc-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
run-contract-tests:
runs-on: [self-hosted, ubuntu-20.04, X64, small]
name: Run smart contracts tests
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -69,6 +71,7 @@ jobs:
run: pnpm -F contracts run coverage

- name: Upload coverage to Codecov
if: ${{ env.CODECOV_TOKEN != '' }}
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
Expand Down

0 comments on commit 26ba22e

Please sign in to comment.