DEV Community

Cover image for Setup GitHub Actions as CI for Ember addons
Jeldrik Hanschke
Jeldrik Hanschke

Posted on

Setup GitHub Actions as CI for Ember addons

Developers creating Ember Addons did not need to care about CI setup when starting a new addon for a long time. Ember CLI generated a ready to be used TravisCI configuration automatically. One click in Travis dashboard to enable it for the new project was enough to get continuous integration up and running.

Sadly TravisCI recently changed their plan for open source projects dramatically. Runners for were cut. Pipelines stayed in pending state for days. A few weeks later Travis enforced a limit on CI minutes per month for open source projects running on The limit is too small for many projects. Long story short: Travis basically dropped their free plan for open source projects.

Luckly GitHub provides a great replacement: GitHub Actions. It is free for open source projects and doesn't have a limit on CI minutes. It doesn't even require the maintainer to manual enable it. Push the configuration file to the repository and you are done. 🚀

But who wants to write such configuration himself? I want to focus on the addon I'm building. Needing to learn more about GitHub Actions might be interesting. But not when I'm trying to build the next great addon for our ecosystem!

If you feel the same I have something for you: create-github-actions-setup-for-ember-addon. 🎉

Command to run the script

It is a small node.js script, which creates a GitHub Actions setup for Ember addons automatically. Run yarn create github-actions-setup-for-ember-addon if using yarn or npm init github-actions-setup-for-ember-addons if using NPM in your project folder. Commit the created .github/workflows/ci.yml. And you are done. 🥳

  1. Switch to project folder.

  2. Run the script:

    # in a yarn repo
    yarn create github-actions-setup-for-ember-addon
    # in an npm repo
    npm init github-actions-setup-for-ember-addon
  3. Commit the created .github/workflows/ci.yml file.

  4. See the CI pipeline running.

The script analyzes an existing .travis.yml to determine the CI configuration to be used. As Ember CLI still creates a TravisCI configuration the created GitHub Actions workflow will follow the recommendations for the Ember version used by your project.

Create-github-actions-setup-for-ember-addon is still alpha software. It tries to follow latest best practices. But some questions are not finally resolved yet.

But you do no need to worry. It supports later upgrades of the generated GitHub Actions workflow. All you need to do is running yarn create github-actions-setup-for-ember-addons and your project will be upgraded to latest blueprints. 💪

Try it out right now!

Top comments (0)