-
Notifications
You must be signed in to change notification settings - Fork 181
37 lines (35 loc) · 1.09 KB
/
test-covering-pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: 'Suggested tests to cover this Pull Request'
on:
pull_request_target:
paths:
- '**.java'
jobs:
tests-covering-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18
- run: npm i ioredis
- id: files
uses: Ana06/[email protected]
with:
filter: '*.java'
- id: tests_covering_pr
name: Tests covering PR
env:
REDIS_USER: ${{ secrets.REDIS_USER }}
REDIS_PASS: ${{ secrets.REDIS_PASS }}
REDIS_HOST: ${{ secrets.REDIS_HOST }}
REDIS_PORT: ${{ secrets.REDIS_PORT }}
run: echo "result=$(node .github/scripts/test_covering_pr.js ${{ steps.files.outputs.added_modified }})" >> $GITHUB_OUTPUT
- name: Write a comment into the Pull Request
uses: actions-cool/maintain-one-comment@v3
with:
body: |
${{ steps.tests_covering_pr.outputs.result }}
body-include: '<suggested_tests>'