You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+10-22
Original file line number
Diff line number
Diff line change
@@ -10,31 +10,19 @@ More info [on the Jest getting started guide](https://jestjs.io/docs/en/getting-
10
10
11
11
## Usage
12
12
13
-
Add any of the examples below to your workflow file in`.github/main.workflow`
13
+
With the latest version of GitHub actions, create a`.github/workflow/test.yml` file:
14
14
15
-
This is the simplest example to get it running:
16
-
```
17
-
workflow "New workflow" {
18
-
on = "push"
19
-
resolves = ["Jest"]
20
-
}
21
-
22
-
action "Jest" {
23
-
uses = "stefanoeb/jest-action@master"
24
-
}
25
15
```
16
+
name: Test
26
17
27
-
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:
28
-
```
29
-
workflow "New workflow" {
30
-
on = "push"
31
-
resolves = ["Jest"]
32
-
}
33
-
34
-
action "Jest" {
35
-
uses = "stefanoeb/jest-action@master"
36
-
args = "**.test.js --ci"
37
-
}
18
+
on: [push]
19
+
20
+
jobs:
21
+
test:
22
+
runs-on: ubuntu-latest
23
+
steps:
24
+
- uses: actions/checkout@v1
25
+
- uses: stefanoeb/jest-action@master
38
26
```
39
27
40
28
If there is no previous step installing the necessary modules, this action will execute a `yarn install` or `npm install` automatically.
0 commit comments