FuelLabs/sway

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

Open

#1,136 创建于 2022年4月4日

在 GitHub 查看
 (1 评论) (2 反应) (0 负责人)Rust (5,421 fork)batch import
The Sway Bookcigood first issue

仓库指标

Star
 (61,702 star)
PR 合并指标
 (平均合并 22小时 6分钟) (30 天内合并 16 个 PR)

描述

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.

贡献者指南