Skip to content

cwonrails/jest-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Jest runner

This action executes Jest test runner without any previous action/build step or Docker required.

Prerequisites

Jest

You must have the Jest running locally for the action to execute. More info on the Jest getting started guide

Usage

Add any of the examples below to your workflow file in .github/main.workflow

This is the simplest example to get it running:

workflow "New workflow" {
  on = "push"
  resolves = ["Jest"]
}

action "Jest" {
  uses = "stefanoeb/jest-action@master"
}

By default it will run Jest on all the test files in the project. But you can also specify a glob of files on the args, just like on the Jest CLI, as well as options:

workflow "New workflow" {
  on = "push"
  resolves = ["Jest"]
}

action "Jest" {
  uses = "stefanoeb/jest-action@master"
  args = "**.test.js --ci"
}

If there is no previous step installing the necessary modules, this action will execute a yarn install or npm install automatically.

License

The Dockerfile and associated scripts and documentation in this project are released under the MIT License.

About

Wraps and install Jest test runner in a github action.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 62.8%
  • Dockerfile 37.2%