googleforgames / agones

Dedicated Game Server Hosting and Scaling for Multiplayer Games on Kubernetes
https://agones.dev
Apache License 2.0
6k stars 791 forks source link

CI testing should catch compile errors in the example code #942

Open roberthbailey opened 5 years ago

roberthbailey commented 5 years ago

One way to do this would be to have CI actually run e2e tests that execute the example code (as we do for the simple-udp server). But at minimum we should make sure that the code compiles.

I've recently run across a couple of examples of this:

  1. In https://github.com/googleforgames/agones/pull/934 I pushed a change with a typo (book instead of bool), but the build on that hash succeeded. Running make build locally caught the error immediately.

  2. I recently tried to grab the rust-simple example from the 0.11.0 release tag to deploy it on a 0.11.0 cluster to see if it used to work (while trying to debug https://github.com/googleforgames/agones/issues/938). Unfortunately, the example code didn't build at the release tag.

aLekSer commented 5 years ago

I prepared a PR with building 5 projects from examples directory, but build now took 30 minutes. As it is hard to calculate hash of all the files in examples folders and understand what was changed from last build, we can call this test randomly for example one out of five pushes, using commit-id for instance. Another option is to remove this new step from cloudbuild or somehow use Prow to make this kind of build testing like nightly builds or by request.

roberthbailey commented 3 years ago

I like the idea of doing this less frequently (since the examples don't change often) to not slow down all PRs.

github-actions[bot] commented 1 year ago

'This issue is marked as Stale due to inactivity for more than 30 days. To avoid being marked as 'stale' please add 'awaiting-maintainer' label or add a comment. Thank you for your contributions '

markmandel commented 1 year ago

Added awaiting-maintainer as we should do something here at some point around this.

Maybe it should be conditional on if example code changed?