-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Github Actions #6100
Improve Github Actions #6100
Conversation
Bundle StatsHey there, this message comes from a github action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
Deploying with
|
Latest commit: |
b74138b
|
Status: | ✅ Deploy successful! |
Preview URL: | https://5e57ebd6.web3-js-docs.pages.dev |
Branch Preview URL: | https://improve-github-actions.web3-js-docs.pages.dev |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## 4.x #6100 +/- ##
=======================================
Coverage 87.93% 87.93%
=======================================
Files 199 199
Lines 7570 7570
Branches 2053 2054 +1
=======================================
Hits 6657 6657
Misses 913 913
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Blackbox tests fixed |
@@ -67,6 +68,8 @@ import type { | |||
SignResult, | |||
} from './types'; | |||
|
|||
const secp256k1 = ethereumCryptography.secp256k1 ?? ethereumCryptography; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the reason for needing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in case of ESM secp256k1
was undefined
.github/workflows/build.yml
Outdated
@@ -14,7 +14,7 @@ jobs: | |||
build: | |||
strategy: | |||
matrix: | |||
node: [14, 16] | |||
node: [18, 16] | |||
name: Build Packages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: Build Packages | |
name: Build CJS |
lets be consistent with other build naming and more visibility in ci ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
.github/workflows/build.yml
Outdated
- run: tar -czf /tmp/web3-${{ matrix.node }}.js.tar.gz --exclude="./.git" ./ | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: web3-${{ matrix.node }}.js.tar.gz | ||
path: /tmp/web3-${{ matrix.node }}.js.tar.gz | ||
|
||
build-cjs-types: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build-cjs-types: | |
build-esm-types: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
build-cjs-types: | ||
name: Build ESM & Types | ||
needs: build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no need of needs: build
so it should be removed? as ESM is not dependent on CJS technical
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
esm build doesn't work without cjs
https://github.com/web3/web3.js/actions/runs/5027592934/jobs/9017264915?pr=6100
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.github/workflows/build.yml
Outdated
matrix: | ||
node: [ 18 ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
matrix should only be used when we want to run job for multiple variables, so it should be removed, as Lint is being run for one node version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
.github/workflows/build.yml
Outdated
|
||
build-web: | ||
name: Build Web | ||
needs: build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: [ 18 ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, for matrix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
node: [14] | ||
node: [16] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here for matrix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Thanks @avkos for fixing ESM bug, and testing on v18, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming we create an issue to track above esm build error, LGTM
Description
Please include a summary of the changes and be sure to follow our Contribution Guidelines.
Type of change
Checklist:
npm run lint
with success and extended the tests and types if necessary.npm run test:unit
with success.npm run test:coverage
and my test cases cover all the lines and branches of the added code.npm run build
and testeddist/web3.min.js
in a browser.CHANGELOG.md
file in the root folder.