Feature: Carbon DeFi #2
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: Node.js Build and Test | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
lint-and-verify-cli: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Install dependencies | |
run: npm ci | |
- name: Verify eslint config | |
run: npm run lint | |
- name: Verify prettier config | |
run: npm run prettier | |
- name: Build | |
run: npm run build | |
- name: Create new adapter with DefaultAdapter template | |
run: | | |
npm run new-adapter -- -p test-default-adapter-protocol -pd test-default-adapter-product -c 1 -t DefaultAdapter -y | |
npm run build | |
- name: Create new adapter with SimplePoolAdapter template | |
run: | | |
npm run new-adapter -- -p test-simple-pool-adapter-protocol -pd test-simple-pool-adapter-product -c 1 -t SimplePoolAdapter -y | |
npm run build | |
npm run build-metadata -- -p test-simple-pool-adapter-protocol | |
npm run build | |
run-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Run tests | |
run: npm run test:cov | |
env: | |
ETHEREUM_PROVIDER_URL: ${{ secrets.ETHEREUM_PROVIDER_URL }} | |
OPTIMISM_PROVIDER_URL: ${{ secrets.OPTIMISM_PROVIDER_URL }} | |
BSC_PROVIDER_URL: ${{ secrets.BSC_PROVIDER_URL }} | |
POLYGON_PROVIDER_URL: ${{ secrets.POLYGON_PROVIDER_URL }} | |
FANTOM_PROVIDER_URL: ${{ secrets.FANTOM_PROVIDER_URL }} | |
BASE_PROVIDER_URL: ${{ secrets.BASE_PROVIDER_URL }} | |
ARBITRUM_PROVIDER_URL: ${{ secrets.ARBITRUM_PROVIDER_URL }} | |
AVALANCHE_PROVIDER_URL: ${{ secrets.AVALANCHE_PROVIDER_URL }} | |
LINEA_PROVIDER_URL: ${{ secrets.LINEA_PROVIDER_URL }} | |
ENABLE_MULTICALL_QUEUE: true |