The Crystal Programming Language Forum

Github Actions

Been working with Github Actions over the last few weeks and thought others might also be interested in a good template for running specs etc

this does the following:

  1. runs specs when something changes
  2. runs specs once a week (Monday morning)
  3. ensures specs pass on version 1 and latest
  4. specs are run on nightly but don’t cause the badge to go red if this fails
  5. checks the code files are formatted properly
  6. runs ameba over the code to highlight any potential issues

We also use Actions to build docker images

Would love to know if anyone else is doing anything interesting too :slight_smile:

3 Likes

In case you missed it, there is also a great dedicated GitHub action install-crystal and a configurator tool for that at Configurator - install-crystal action

6 Likes

that configurator is pretty cool!

Are there any github actions examples that build artifacts on the various mac versions to be able to use in a homebrew tap? I’m working on a CLI thing that would be cool to have people install without needing to install crystal if they don’t have it so pre-building the binary is necessary, but also I’m not sure if the homebrew main project would accept it.

@will I’ve got some stuff setup for that with my tool mstrap: mstrap/.github/workflows at master · maxfierke/mstrap · GitHub

It’s got building with notarization and code-signing for macOS. Could probably expand it to do different OS version targeting by setting MACOSX_DEPLOYMENT_TARGET in the environment.

2 Likes

Awesome, thank you!