Skip to content

Commit 4f374a7

Browse files
committed
Update README.md with information on how to setup this action
1 parent 55e7a08 commit 4f374a7

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,22 @@
22

33
This GitHub Action requires writing the tests in Pull Requests, by requesting changes and posting a comment if tests are missing.
44

5-
To install it, copy and paste the following snippet into your `.github/workflows/*.yml` file.
5+
To install it, copy and paste the following snippet into your `.github/workflows/require-tests.yml` file.
66

77
```yaml
8-
- name: Require tests if source code is changed
9-
uses: infection/tests-checker-action@v1
10-
with:
11-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8+
name: 'Require tests if source code is changed'
9+
10+
on:
11+
pull_request:
12+
types: [opened]
13+
14+
jobs:
15+
check:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: infection/tests-checker-action@v1
19+
with:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1221
```
1322
1423
<img width="990" alt="tests-checker" src="https://user-images.githubusercontent.com/3725595/45590526-b7f3fa00-b942-11e8-972d-143c0b367017.png">

0 commit comments

Comments
 (0)