Skip to content

fix morpho adapter by aggregating by timestamp so it doesn't generate multiple events for the same section #232

fix morpho adapter by aggregating by timestamp so it doesn't generate multiple events for the same section

fix morpho adapter by aggregating by timestamp so it doesn't generate multiple events for the same section #232

Workflow file for this run

name: Test_Change
on: pull_request
jobs:
test:
runs-on: ubuntu-latest
steps:
- id: file_changes
uses: trilom/file-changes-action@ce38c8ce2459ca3c303415eec8cb0409857b4272
with:
output: "json"
fileOutput: "json"
- name: Check out repository code
uses: actions/checkout@v2
- name: Run changed files through test script
run: |
npm i
npm install -g ts-node
MODIFIED=${{ steps.file_changes.outputs.files_modified}} \
ADDED=${{ steps.file_changes.outputs.files_added}} \
ts-node ${{ github.workspace }}/.github/workflows/getTest.ts
RUN_FILES=$(
MODIFIED=${{ steps.file_changes.outputs.files_modified}} \
ADDED=${{ steps.file_changes.outputs.files_added}} \
ts-node ${{ github.workspace }}/.github/workflows/getFileList.ts
)
if [ "$RUN_FILES" = "[]" ]; then
echo "No adapter files were modified"
exit 0
fi
for i in $(echo $RUN_FILES | tr -d '[]' | tr "," "\n")
do
{
ts-node ${{ github.workspace }}/utils/test.ts ${{ github.workspace }}/${i} true
ts-node ${{ github.workspace }}/.github/workflows/comment.ts /home/runner/work/emissions-adapters/emissions-adapters/result.txt "${{ github.repository_owner }}" "${{ github.event.repository.name }}" "${{ github.event.number }}" ${i}
} || {
echo -n $i
echo ' doesnt run'
}
done