Skip to content

Commit

Permalink
ci: Updating the build workflow to use Codecov actions instead of cod…
Browse files Browse the repository at this point in the history
…ecov npm package. (#2558)

* ci: Updating the build workflow to use Codecov actions instead of codecov npm package.

Signed-off-by: Vasil Boyadzhiev <[email protected]>

* ci: Attempting a workaround for lcov.info missing.

Signed-off-by: Vasil Boyadzhiev <[email protected]>

* ci: Commenting out long running jobs to try and troubleshoot.

Signed-off-by: Vasil Boyadzhiev <[email protected]>

* ci: Troubleshooting folder contents

Signed-off-by: Vasil Boyadzhiev <[email protected]>

* ci: testing with different task

Signed-off-by: Vasil Boyadzhiev <[email protected]>

* ci: Adding in back Node start and stop

Signed-off-by: Vasil Boyadzhiev <[email protected]>

* ci: Editing the tasks and testing again

Signed-off-by: Vasil Boyadzhiev <[email protected]>

* ci: changing from c8 to nyc

Signed-off-by: Vasil Boyadzhiev <[email protected]>

* ci: removing one more npx codecov for troubleshooting

Signed-off-by: Vasil Boyadzhiev <[email protected]>

* ci: Re-enable integration and final job changes.

Signed-off-by: Vasil Boyadzhiev <[email protected]>

* ci: reverting back to c8 from nyc

Signed-off-by: Vasil Boyadzhiev <[email protected]>

* Removing .nycrc.json as its no longer needed.

Signed-off-by: Vasil Boyadzhiev <[email protected]>

---------

Signed-off-by: Vasil Boyadzhiev <[email protected]>
Signed-off-by: Vasil Boyadzhiev <[email protected]>
  • Loading branch information
san-est authored Oct 4, 2024
1 parent 6270961 commit 8bf5b24
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,17 @@ jobs:
# Wait for the network to fully start
sleep 30
- name: Run Hedera SDK Integration Tests Codecov
- name: Run Hedera SDK Integration Tests
if: ${{ steps.build-sdk.conclusion == 'success' && steps.start-local-node.conclusion == 'success' && !cancelled() && always() }}
run: ${{ env.CG_EXEC }} task test:integration:codecov

- name: Upload coverage to Codecov
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info
fail_ci_if_error: false

- name: Stop the local node
id: stop-local-node
if: ${{ steps.start-local-node.conclusion == 'success' && !cancelled() && always() }}
Expand All @@ -137,16 +144,29 @@ jobs:
working-directory: packages/cryptography
if: ${{ steps.build-sdk.conclusion == 'success' && steps.stop-local-node.conclusion == 'success' && !cancelled() && always() }}
run: ${{ env.CG_EXEC }} task test:unit

- name: Codecov @hashgraph/cryptography
working-directory: packages/cryptography
if: ${{ steps.build-sdk.conclusion == 'success' && steps.stop-local-node.conclusion == 'success' && !cancelled() && always() }}
run: ${{ env.CG_EXEC }} task test:unit:codecov

- name: Upload @hashgraph/cryptography coverage to Codecov
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./packages/cryptography/coverage/lcov.info
fail_ci_if_error: false

- name: Unit Test @hashgraph/sdk
if: ${{ steps.build-sdk.conclusion == 'success' && steps.stop-local-node.conclusion == 'success' && steps.playwright-deps.conclusion == 'success' && !cancelled() && always() }}
run: ${{ env.CG_EXEC }} task test:unit

- name: Codecov @hashgraph/sdk
if: ${{ steps.build-sdk.conclusion == 'success' && steps.stop-local-node.conclusion == 'success' && !cancelled() && always() }}
run: ${{ env.CG_EXEC }} task test:unit:codecov

- name: Upload @hashgraph/sdk coverage to Codecov
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
2 changes: 0 additions & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ tasks:
cmds:
- npx c8 --reporter=lcov --reporter=text-summary ./node_modules/.bin/mocha --inline-diffs -r @babel/register -r chai/register-expect.js "test/unit/*.js" {{.CLI_ARGS}}
- npx c8 report
- npx codecov

"test:unit:browser":
cmds:
Expand All @@ -156,7 +155,6 @@ tasks:
cmds:
- npx c8 --reporter=lcov --reporter=text-summary ./node_modules/.bin/mocha --exit -r @babel/register -r chai/register-expect.js "test/integration/*.js" {{.CLI_ARGS}}
- npx c8 report
- npx codecov

"update:proto":
deps:
Expand Down
1 change: 0 additions & 1 deletion packages/cryptography/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ tasks:
cmds:
- npx c8 --reporter=lcov --reporter=text-summary ./node_modules/.bin/mocha --inline-diffs -r @babel/register -r chai/register-expect.js "test/unit/*.js" {{.CLI_ARGS}}
- npx c8 report
- npx codecov

"test:unit:browser":
cmds:
Expand Down

0 comments on commit 8bf5b24

Please sign in to comment.