i'd like to do a check metadata validation in advance even before creating package version in each PR.
My question is do we have any way to do check
- code-coverage
- verify metadata before creating package
Create a scratch org, then run the deployment against that org:
sf project deploy start -o scratch-org -w 100 --dry-run -d force-app -l RunLocalTests
This should give you all of the information you're likely looking for.
For a CI/CD setup, you can use pools of scratch orgs to minimize resource usage, if necessary.