App-tests via a GitHub action

What’s the best way to get the results of the tests and report the results?

I’m trying to setup a pipeline whereby a GitHub action is run for every commit to do all unit tests and app tests.

Any suggestions? Thanks a lot.

We have an org lea.online developers · GitHub where we have many repositories with different test setups (Project, Package Package with Testproject), all using GitHub actions. Feel free to clone,copy, improve etc.

Thank you so much! This is super useful.

A few questions if you don’t mind!

  1. In backend/test.sh, I see you’re running meteor test. When tests fail, does meteor exit with an error code so you’ll get a special email alert via GitHub, or do you peek at the log every time the action runs?
  2. Do you run integration tests (meteor app-test) at all? Is that what you’re using Jest for? Looks like yes. Do you get email alerts on failures via Jest/GitHub or what’s the user interaction there look like?

Thanks again, much appreciated.

1 Like
  1. The test.sh script only wraps the test commands with all dependencies resolved. It will of course exit with non-zero on error. It’s convenient because I use it for local testing, too so it behaves
  2. I currently only run unit tests but you can easily extend e2e for example leaonline-ui uses puppeteer to test some blaze templates
2 Likes

Thanks. I don’t mean exit with an error code on error - I mean how do you know if a test fails?