FuelLabs/sway

Add CI job to generate default Forc manifest and compare against a saved version

Open

#1,136 opened on 2022年4月4日

GitHub で見る
 (1 comment) (2 reactions) (0 assignees)Rust (5,421 forks)batch import
The Sway Bookcigood first issue

Repository metrics

Stars
 (61,702 stars)
PR merge metrics
 (平均マージ 22h 6m) (30d で 16 merged PRs)

説明

Problems

Currently there are two problems:

  1. Examples that are built use a local path for the standard library in order to guarantee they don't break. This mean there are no examples that use the default Forc manifest that uses this repo's master branch for the standard library.
  2. Such an example is needed for the docs and potentially in other places. https://github.com/FuelLabs/sway/blob/a40472f2a67aa4907c29af0d079ab360c8892b4b/docs/src/introduction/forc_project.md?plain=1#L25

Tasks

  • Manually generate the default Forc.toml and save it to a directory. examples/ might not be a good directory for this since all examples are built as part of CI currently and modifying that job would be more work.
  • Add a CI job that generates the default Forc.toml and compares it against the saved Forc.toml. If they differ, fail.
  • Use this saved Forc.toml in the book as linked above.
  • Update forc init to generate a more elaborate test harness than we have today. Specifically, it should include the most common imports, the abigen, loading and deploying the contract from out/debug/, the wallet and provider, and the contract instance.
  • Manually generate the default test harness and save it to a directory.
  • Add a CI job that generates the default test harness and compares it against the save one.
  • Use this saved test harness in the book.
  • Add a CI that runs forc test with the default test harness.

コントリビューターガイド