Fix Ondo unlock schedule #200
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_Change | |
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 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 |