Auto-GPT-Plugins icon indicating copy to clipboard operation
Auto-GPT-Plugins copied to clipboard

test plugin installation with every PR

Open h4ck3rk3y opened this issue 2 years ago • 5 comments

h4ck3rk3y avatar May 10 '23 19:05 h4ck3rk3y

Codecov Report

Patch coverage has no change and project coverage change: +0.02 :tada:

Comparison is base (b3f2c79) 67.19% compared to head (8e8701a) 67.21%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #131      +/-   ##
==========================================
+ Coverage   67.19%   67.21%   +0.02%     
==========================================
  Files          21       21              
  Lines        1451     1458       +7     
  Branches      178      180       +2     
==========================================
+ Hits          975      980       +5     
- Misses        461      462       +1     
- Partials       15       16       +1     

see 1 file with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar May 10 '23 19:05 codecov[bot]

If this doesn’t take too long to run, may be worth running every PR?

ntindle avatar May 10 '23 19:05 ntindle

@ntindle this took me longer than I had expected but now

  1. It runs on every PR
  2. Pulls the current zip from the current PR; if its on a fork on or the repository itself
  3. Runs an installation of the plugin

Note, we run this against all plugins on this repository but perhaps running against simply twitter is enough as the Zip that its downloading is the same regardless of the plugin

Can edit this https://github.com/Significant-Gravitas/Auto-GPT-Plugins/pull/131/files#diff-a4191819a33cf0551ad8ed92b44df03c85a26b20f1fd09b8ae755740ce123572R22 to just twitter if we want to save some compute

h4ck3rk3y avatar May 10 '23 21:05 h4ck3rk3y

Compute is free for us here so we will keep it in order to build out integration tests later on

ntindle avatar May 10 '23 21:05 ntindle

@ntindle Sweet, will let it stay this way then.

I fixed the autogpt-package to make assertions on the installation of plugins being correct. Earlier we would run it with python -m autogpt --install-plugin-deps which would create an interactive terminal but now the plugin installation logic just asserts that the exit code is 0 for python scripts/install_plugin_deps.py.

h4ck3rk3y avatar May 10 '23 22:05 h4ck3rk3y

The runtime of the test went up as I made some fixes; which makes us actually install the plugins dependencies properly

run

Here's an example ^ of the package running with AutoGPTTwitter. I have also renamed the plugins passable to the classes that AutoGPT expects. You can see that the plugin gets installed & runs fine.

Our package code asserts that the installation succeeds by asserting that the exit code is 0 for python scripts/install_plugin_deps.py

Let me know what you think @ntindle

h4ck3rk3y avatar May 11 '23 22:05 h4ck3rk3y

This is great. We should notate the need for the plugin to be added to the workflow for first party plugins

ntindle avatar May 12 '23 05:05 ntindle