recursecenter / pairing-bot

A Zulip bot that partners people for pair programming practice
MIT License
22 stars 15 forks source link

Create a testing environment for Pairing Bot #23

Open stillgreenmoss opened 3 years ago

stillgreenmoss commented 3 years ago

Pairing Bot does not currently have a testing environment -- it would be awesome if she did!

Any recurser, though especially recursers currently in batch, should message me or @parsn1psoup if they'd like to work on this.

cceckman commented 3 months ago

@stillgreenmoss Does the -dev environment / testing version satisfy this?

cceckman commented 3 months ago

The "dev" environment is pretty usable for this. It has the crons (which can be triggered manually), has its own database and bot-user, so it can do most end-to-end things without bothering non-developers. (It won't send the broadcast messages, e.g. end-of-batch or weekly checkins, so those are a bit harder to test.)

@jdkaplan mentioned doing some work on allowing Pairing Bot to run locally, which I think would be a nice enhancement to the test-ability; it's a pain to wait multiple minutes for a GAE build, when the program itself takes a fraction of a second to build.

jdkaplan commented 3 months ago

I think I've got something! There's a Firestore emulator available as an optional gcloud component, which is well-supported by the Firestore SDK we're using. I've got a proof-of-concept DB round-trip test that runs entirely locally!

I'm fairly certain that I can get it running in CI by using the official setup-gcloud action.

I'll have a draft PR up in a bit to iterate on the CI setup and make sure the local dev stuff is portable to other machines.