Github Actions implementations to test the agent examples#21
Github Actions implementations to test the agent examples#21JoseRodrigues443 wants to merge 28 commits into
Conversation
Feat/pipeline for build all examples
haseebrabbani
left a comment
There was a problem hiding this comment.
this is awesome! really appreciate adding these Github actions 🙌🏼
some points though:
- renaming the agent entry point (i.e. agent.ts -> agentCore.ts) will prevent the agent from running. the CLI looks for a file called agent.js/ts/py to begin execution
- the default object exported from the agent.js/ts file must provide the handler(s) using the
handleTransactionkey - you bring up a good point about getJsonRpcUrl preventing tests from running without specifying a forta.config.json. I have been planning to set some sort of ENV variable when running tests that would allow this to work
Minor typo fix
|
@haseebrabbani thank you for the fast response 💯 However please take into consideration that the projects still have the The problem is that the agent file executes the method What I did to fix that was:
|
|
hey @JoseRodrigues443 🙂 I just released JS SDK v0.0.39 and Python SDK v0.0.13 which fixes the issue of |
* Merge * Agent core separation is not needed anymore * Added generic test * Added ignore missing test * Added ignore py
|
Fixed @haseebrabbani |

Description
Currently, if I or the community wants to add a new example there is no pipeline to guarantee code quality. Also to test if any breaking change on the Forta agent occurred this is a great repo to catch and test that.
So this PR adds a GitHub action that runs a pipeline that builds each agent example and then runs the test battery
An example of this pipeline running can be seen here.
Also, the agent's tests required always a
jsonRpcUrlin theforta.config.jsonconfig file, making it hard to run the pipeline without any keys or secrets, so was provided a way to test the mocked version without the methodgetEthersProvider()breaking the build.Type of change
How Has This Been Tested?
All the Javascript and Typescript agents now can run the tests.
Checklist: