Update runScript.js
and readme
#11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |