Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stefanoeb/jest-action
Wraps and install Jest test runner in a github action.
https://github.com/stefanoeb/jest-action
actions ci javascript jest
Last synced: about 1 month ago
JSON representation
Wraps and install Jest test runner in a github action.
- Host: GitHub
- URL: https://github.com/stefanoeb/jest-action
- Owner: stefanoeb
- License: mit
- Created: 2019-01-25T20:28:00.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-07T09:55:25.000Z (over 4 years ago)
- Last Synced: 2024-11-09T11:49:12.592Z (about 2 months ago)
- Topics: actions, ci, javascript, jest
- Language: Shell
- Size: 16.6 KB
- Stars: 95
- Watchers: 3
- Forks: 20
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ⚠️⚠️⚠️ You don't need this action ⚠️⚠️⚠️
Github Actions have everything that you need to run your jest tests, to do that simply use the `run` commands like so:
```yml
name: CI
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install modules
run: yarn
- name: Run tests
run: yarn test
```---
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](https://jestjs.io/docs/en/getting-started)## Usage
Add to your `main.yml` file or create a new file named `.github/workflows/test.yml` and add:
```yml
name: Tests
on: [push]
jobs:
build:runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Run Jest
uses: stefanoeb/[email protected]
```You can also pass custom args to jest through the `with:` parameter:
```yml
name: Tests
on: [push]
jobs:
build:runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Run Jest
uses: stefanoeb/[email protected]
with:
jestArgs: path/to/my.test.js
```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](LICENSE).