Skip to content

[PENDLE] Added mantle TVL & pool whitelisting & separate supply side fees from revenue #1966

[PENDLE] Added mantle TVL & pool whitelisting & separate supply side fees from revenue

[PENDLE] Added mantle TVL & pool whitelisting & separate supply side fees from revenue #1966

Workflow file for this run

name: test-adapter
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
run: |
RUN_FILES=$(
MODIFIED=${{ steps.file_changes.outputs.files_modified}} \
ADDED=${{ steps.file_changes.outputs.files_added}} \
node ${{ github.workspace }}/.github/workflows/getFileList.js
)
if [ "$RUN_FILES" = "[]" ]; then
echo "No adapter files were modified"
exit 0
fi
yarn install --production
yarn upgrade @defillama/sdk
list=$(echo $RUN_FILES | tr -d '"[]' | tr "," "\n")
for i in ${list}
do
{
IFS='@' read -r -a array <<< "$i"
yarn test ${array[0]} ${array[1]} 2>&1 | tee output.txt
node ${{ github.workspace }}/.github/workflows/commentResult.js /home/runner/work/dimension-adapters/dimension-adapters/output.txt "${{ github.repository_owner }}" "${{ github.event.repository.name }}" "${{ github.event.number }}" ${i}
if grep -q "\-\-\-\- ERROR \-\-\-\-" output.txt; then
exit 1;
fi
} || {
echo -n $i
echo ' doesnt run'
}
done