Skip to content
Alex LaFroscia edited this page May 14, 2019 · 5 revisions

This GitHub Action provides the ability to run your Ember tests in Google Chrome. It should work out of the box with the testem.js configuration provided by the Ember CLI

Basic Setup

This action only runs your tests; it does not install your dependencies. This allows the Action to be un-opinionated about your choice of package manager; it assumes that your dependencies have already been installed in a previous action.

Dependency Installation through yarn

A basic workflow for running your tests on each push looks like this, if you're using yarn for your dependencies

workflow "Build and Test" {
  on = "push"
  resolves = ["Run Tests"]
}

action "Install Dependencies" {
  uses = "nuxt/actions-yarn@node-10"
  args = "install"
}

action "Run Tests" {
  uses = "alexlafroscia/actions-ember-testing@master"
  needs = ["Install Dependencies"]
}

Which says that on push, you'll run the Action called Run Tests. It has a dependency on Install Dependencies, which itself uses a separate action for installing your dependencies. The node-10 tag is provided on that Action is specified since that's the node version used by the test environment.

Dependency Installation through npm

If you want to install your dependencies through npm instead of yarn, you can define your workflow like this instead:

workflow "Test and deploy" {
  on = "push"
  resolves = ["Run ember tests"]
}

action "Install Dependencies" {
  uses = "actions/npm@master"
  args = "install"
}

action "Run ember tests" {
  uses = "alexlafroscia/actions-ember-testing@master"
  needs = ["Install Dependencies"]
}

The only difference from the previous example is that the Action run on the Install Dependencies step uses the official npm action to install the dependencies, rather than one that wraps yarn.

Advanced Setup

Want slightly more than just the basic setup? Check out the following docs for examples of more powerful things you can do with GitHub Actions!