Skip to content
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

Add GitHub Actions YAML file #33

Closed
anton-trunov opened this issue Sep 25, 2024 · 7 comments · Fixed by #34
Closed

Add GitHub Actions YAML file #33

anton-trunov opened this issue Sep 25, 2024 · 7 comments · Fixed by #34
Assignees

Comments

@anton-trunov
Copy link
Member

anton-trunov commented Sep 25, 2024

This should allow users to automatically build contracts, run tests and run the misti static analyzer if they host their projects on GitHub.

Related Blueprint issue: ton-org/create-ton#22

@jubnzv
Copy link
Member

jubnzv commented Sep 26, 2024

I would help at least with Misti integration. The configuration process should match the instruction: https://nowarp.io/tools/misti/docs/tutorial/ci-cd.

Perhaps, we should also restrict the default warning severity level to Medium (-m medium) in order to make it less noisy.

@anton-trunov
Copy link
Member Author

@jubnzv Feel free too add CI to this repo, any help would be greatly appreciated

@jubnzv
Copy link
Member

jubnzv commented Sep 27, 2024

I would implement Misti integration as a separate GitHub action: nowarp/misti#153.

However, I would need to prepare an additional minor release for Misti to make the analysis less noisy and more configurable. At a minimum, I would need:

Additionally, I would improve blueprint integration to enable running the GitHub action for blueprint plugins:

After implementing this I suggest to create an another minor release (since my roadmap for more valuable detectors hasn't approved: ton-society/grants-and-bounties#777), release a github action and integrate it to the Tact template.

@jubnzv
Copy link
Member

jubnzv commented Sep 27, 2024

Otherwise, if we need to implement this ASAP, we can add a CI without running Misti and simply include it to the package.json adding usage instructions.

@anton-trunov
Copy link
Member Author

We don't really need it ASAP, let's solve it the proper way.

@jubnzv
Copy link
Member

jubnzv commented Sep 27, 2024

Alright, here is my plan for the next minor release that includes adding the GitHub action: https://github.com/nowarp/misti/milestone/8.

@jubnzv
Copy link
Member

jubnzv commented Oct 11, 2024

I developed the initial implementation of a GitHub Action for Misti, but I decided not to publish it. Here are the problems:

  • The blueprint configuration is too complicated: we need a flag if the blueprint is used, the name/names of the blueprint projects to analyze, and a command to run the blueprint (e.g., npx blueprint misti, yarn blueprint misti, etc.). The user also has to manually install and configure the blueprint-misti plugin before running it. This overcomplicates things, and a single run action would be more explicit and simpler.
  • We still need to specify arguments for the Misti command or keep the action's configuration up-to-date with the current CLI options in Misti, which requires creating custom options.
  • The GitHub Actions runner for Node doesn't support Node.js 20+. Therefore, the implementation must be wrapped in Docker.

Overall, at this time, a separate GitHub Action for Misti is not feasible and only complicates things. It might become simpler later when we eliminate extra configuration options, introduce execution without Tact configuration, hack Blueprint, and when Node22 becomes available for GitHub Actions. For now, it makes no sense.

I will prepare a CI in this repo without using the misti-action package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants