-
Notifications
You must be signed in to change notification settings - Fork 4
36 lines (31 loc) · 1.01 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
30
31
32
33
34
35
36
name: Test getUserTVLByBlock method
on:
pull_request:
paths:
- '**/' # Listen for changes in any directory
jobs:
test-adapters:
runs-on: ubuntu-latest
env:
FOLDER_NAME: ""
steps:
- uses: actions/[email protected]
# Extract and process changed folders
- name: Get changed folders
id: changed_folders
run: |
changed_folders=$(git diff --name-only HEAD^ HEAD | awk -F/ '{print $2}' | sort -u)
echo "::set-output name=changed_folders::$changed_folders"
- name: Print changed folders
run: echo "Changed folders: ${{ steps.changed_folders.outputs.changed_folders }}"
# Loop through changed folders
- name: Run commands in each folder
run: |
for folder in ${{ steps.changed_folders.outputs.changed_folders }}; do
cd adapters/$folder
npm install
npm run compile
cd ../../
npm install
npm run start $folder
done