Skip to content

Commit f0a5876

Browse files
authored
Add GitHub Action to Require Tests in Pull Requests (#730)
1 parent 342b493 commit f0a5876

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/require-tests.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: 'Require Tests on Code Change'
2+
3+
on:
4+
pull_request_target:
5+
types: [opened]
6+
7+
jobs:
8+
check:
9+
name: 'Require Tests on Code Change'
10+
11+
runs-on: ubuntu-22.04
12+
13+
steps:
14+
- name: "Execute tests-checker-action"
15+
uses: infection/[email protected]
16+
with:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
comment: Could you please add tests to make sure this change works as expected?
19+
fileExtensions: '.php'
20+
testDir: 'tests'
21+
testPattern: '*Test.php'

0 commit comments

Comments
 (0)