-
Notifications
You must be signed in to change notification settings - Fork 5.4k
29 lines (29 loc) · 1.02 KB
/
test.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
name: Test Changes
on:
pull_request
jobs:
test:
runs-on: ubuntu-latest
steps:
- id: file_changes
uses: trilom/[email protected]
with:
output: 'json'
fileOutput: 'json'
- name: Check out repository code
uses: actions/checkout@v2
- name: Run changes files through test script
env:
TESTER_KEY: ${{ secrets.TESTER_KEY }}
run: |
npm install
for i in $(echo ${{ steps.file_changes.outputs.files_modified}} | tr -d '[]' | tr "," "\n")
do
{
node ${{ github.workspace }}/test.js ${{ github.workspace }}/${i} > output.txt
node ${{ github.workspace }}/.github/workflows/commentResult.js /home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/output.txt "${{ github.repository_owner }}" "${{ github.event.repository.name }}" "${{ github.event.number }}" ${i} $TESTER_KEY
} || {
echo -n $i
echo ' doesnt run'
}
done