near / nearcore

Reference client for NEAR Protocol
https://near.org
GNU General Public License v3.0
2.32k stars 623 forks source link

ci: add workflow to build published crates in isolation #12039

Closed mooori closed 1 month ago

mooori commented 1 month ago

Currently CI may be green even when building a published crate in isolation fails, as described in #11985. This PR adds a CI workflow to catch such scenarios. Commit 4ac281e verifies it works as intended, since for its CI run everything is green except for the newly added workflow. (Clicking below on the red X next to 4ac281e shows workflow results.)

Closes #11985

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 71.44%. Comparing base (aa72a8f) to head (6eb8b47). Report is 42 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #12039 +/- ## ========================================== + Coverage 71.43% 71.44% +0.01% ========================================== Files 814 814 Lines 164774 164774 Branches 164774 164774 ========================================== + Hits 117700 117719 +19 + Misses 41905 41888 -17 + Partials 5169 5167 -2 ``` | [Flag](https://app.codecov.io/gh/near/nearcore/pull/12039/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | Coverage Δ | | |---|---|---| | [backward-compatibility](https://app.codecov.io/gh/near/nearcore/pull/12039/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.17% <ø> (ø)` | | | [db-migration](https://app.codecov.io/gh/near/nearcore/pull/12039/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.17% <ø> (ø)` | | | [genesis-check](https://app.codecov.io/gh/near/nearcore/pull/12039/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.27% <ø> (ø)` | | | [integration-tests](https://app.codecov.io/gh/near/nearcore/pull/12039/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `38.56% <ø> (+0.01%)` | :arrow_up: | | [linux](https://app.codecov.io/gh/near/nearcore/pull/12039/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `71.23% <ø> (-0.01%)` | :arrow_down: | | [linux-nightly](https://app.codecov.io/gh/near/nearcore/pull/12039/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `71.03% <ø> (+0.01%)` | :arrow_up: | | [macos](https://app.codecov.io/gh/near/nearcore/pull/12039/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `54.11% <ø> (+0.62%)` | :arrow_up: | | [pytests](https://app.codecov.io/gh/near/nearcore/pull/12039/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.54% <ø> (ø)` | | | [sanity-checks](https://app.codecov.io/gh/near/nearcore/pull/12039/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.34% <ø> (ø)` | | | [unittests](https://app.codecov.io/gh/near/nearcore/pull/12039/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `65.29% <ø> (-0.03%)` | :arrow_down: | | [upgradability](https://app.codecov.io/gh/near/nearcore/pull/12039/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.21% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mooori commented 1 month ago

Doing a dry run publish or publishing the crates to a dummy registry turns out to be quite tricky as described in #11985. Closing for now as there is another project with higher priority.