Skip to content

Commit

Permalink
chore: format yaml file
Browse files Browse the repository at this point in the history
  • Loading branch information
SGiaccobasso committed Sep 23, 2024
1 parent 08ff230 commit f926ea1
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions .github/workflows/validate-tokens.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,44 @@ name: Validate New Token Configurations
on:
pull_request:
paths:
- 'registry/mainnet/interchain/squid.tokenlist.json'
- "registry/mainnet/interchain/squid.tokenlist.json"

jobs:
validate-tokens:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- uses: actions/checkout@v2

- name: Install dependencies
run: |
npm install -g typescript
npm install ethers@5.7.2
npm install viem
npm install axios
npm install fs
npm install @types/node
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: "16"

- name: Compile TypeScript
run: tsc validate-token-configs.ts
- name: Install dependencies
run: |
npm install -g typescript
npm install ethers@5.7.2
npm install viem
npm install axios
npm install fs
npm install @types/node
- name: Extract and validate new tokens
run: |
DIFF=$(git diff origin/${{ github.base_ref }} -- registry/mainnet/interchain/squid.tokenlist.json | grep '^+' | grep -v '+++')
NEW_TOKENS=$(echo "$DIFF" | sed -n '/"0x/,/]/{/]/q;p}' | jq -s 'reduce .[] as $item ({}; . + ($item | fromjson))')
echo "$NEW_TOKENS" > new_tokens.json
node validate-token-configs.ts
- name: Compile TypeScript
run: tsc validate-token-configs.ts

- name: Check validation results
run: |
if [ -f validation_errors.txt ]; then
echo "Validation errors found:"
cat validation_errors.txt
exit 1
else
echo "All new token configurations are valid."
fi
- name: Extract and validate new tokens
run: |
DIFF=$(git diff origin/${{ github.base_ref }} -- registry/mainnet/interchain/squid.tokenlist.json | grep '^+' | grep -v '+++')
NEW_TOKENS=$(echo "$DIFF" | sed -n '/"0x/,/]/{/]/q;p}' | jq -s 'reduce .[] as $item ({}; . + ($item | fromjson))')
echo "$NEW_TOKENS" > new_tokens.json
node validate-token-configs.ts
- name: Check validation results
run: |
if [ -f validation_errors.txt ]; then
echo "Validation errors found:"
cat validation_errors.txt
exit 1
else
echo "All new token configurations are valid."
fi

0 comments on commit f926ea1

Please sign in to comment.