What are some CI/CD workflows developers use?

Does anyone have any experience implementing a CI/CD workflow for Roblox dev?

Used in somewhat large teams,

  • things like handling dependencies like instances,
  • methods of doing unit testing, etc.

I’m aware of these tools that exist, however, I’m not sure how I’d go on about using them…

  • Foreman, Remodel, Lemur.

We already use TestEZ and do tests in studio, however, we want to look into using Github actions to kinda automate testing for any case that someone tries to push and either forget to test or simply out of bad judgment, doesn’t test.

When I started typing this answer, I kind of assumed you would be using a tool like Rojo, but later I figured I’d add that part just in case or if someone whose not using it wants to get an idea of what can be unlocked if used. So yes, using Rojo is really good as you can use so many tools that works on your file system, like the ones you mentioned and also some others I added.

About the tools you mentioned:

  • Foreman
    You can use it to install specific version of other tools you use (like Rojo or Remodel). This is good, if you have different projects that relies on specific versions of some tools or different people working on the project (it makes sure everyone runs the same version).
  • Remodel
    This one is cool! If you want to process a place or a model statically. For example, you could have your main place file with most of your game content (scripts and stuff), and use remodel to extract a list of levels/maps from a folder (on your file system) that contains a bunch of other place files. Remodel would let you use read theses files, copy the level/map and insert them in your main place file. Another example could be to remove all your TestEZ tests from a plugin/game you built with Rojo.
  • Lemur
    This one exist to emulate Roblox Lua in standalone Lua. You can use it to run your TestEZ tests from the command line using a standalone Lua installation. If you don’t have a CI system that can run Roblox Studio (which is probably the case), then you’d use that!

Other tools:

  • Selene
    This can check if each Lua file respects different rules (i.e. no empty-if, no unused variables, only one statement per line)
  • Luacheck
    Another tool to check Lua files. It’s the same kind of tool as Selene. Since Selene is still relatively young, it can be good to use both!
  • Tarmac
    This project is still in its early stages, but can be quite useful already! It can publish assets automatically to Roblox. For example, you can use it to upload images to Roblox and it will generate a Lua file that can be required to obtain the image asset ID for each image.
  • Run-in-roblox
    This one can be used to run your TestEZ tests from the command line, but it boots Roblox Studio and runs the tests in it! You can find an example of run-in-roblox running in Github actions in this repo.

I think this gives a good idea of what’s out there around to start messing around with all these tools.

Here’s an example of a list of tasks a CI system could do:

  • Use Foreman to install the correct version of Rojo and Remodel.
  • Run Luacheck and/or Selene
  • Run unit tests with Lemur
  • Publish your images to Roblox with Tarmac
  • Build a place file/model file with Rojo
  • Use Remodel to filter the tests files from the build place file
  • Use Tarmac to publish your game to Roblox

Hope that’ll help :slight_smile:

5 Likes

I have managed to get run-in-roblox working on CI with GitHub Actions :slight_smile: I’m running TestEZ tests with it. You can see it here: https://github.com/Bytebit-Org/fitumi

2 Likes

That’s awesome!!

Is there a place I can learn more about how the CI Workflow file works?

I did a bit of research on how git action workflows are done, however, in this particular file, there are a few things I’m not entirely certain about. Like,

The first part, about Selene what exactly is the purpose of running selene on this?

and how should the secrets be implemented, like these two, RUNINROBLOXDOWNLOAD and ROBLOSECURITY

The Selene part lints the Lua code.

The RUNINROBLOXDOWNLOAD could be replaced as I believe run-in-roblox is now available through Foreman. But ROBLOSECURITY should just be a ROBLOSECURITY cookie for a throwaway account.

1 Like