feat: basic batchTransfer function #6
Workflow file for this run
This file contains hidden or 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" | |
on: | |
pull_request: | |
push: | |
branches: | |
- "main" | |
env: | |
API_KEY_INFURA: ${{secrets.API_KEY_INFURA}} | |
API_KEY_OPTIMISTIC_ETHERSCAN: ${{secrets.API_KEY_OPTIMISTIC_ETHERSCAN}} | |
API_KEY_ETHERSCAN: ${{secrets.API_KEY_ETHERSCAN}} | |
API_KEY_ALCHEMY: ${{secrets.API_KEY_ALCHEMY}} | |
jobs: | |
build: | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Check out the repo" | |
uses: "actions/checkout@v4" | |
- name: "Install Foundry" | |
uses: "foundry-rs/foundry-toolchain@v1" | |
with: | |
version: nightly | |
- name: "Install foundry libs" | |
run: "forge install" | |
- name: "Build the contracts" | |
run: "forge build" | |
- name: "Add build summary" | |
run: | | |
echo "## Build result" >> $GITHUB_STEP_SUMMARY | |
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY | |
test: | |
needs: ["build"] | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Check out the repo" | |
uses: "actions/checkout@v4" | |
- name: "Install Foundry" | |
uses: "foundry-rs/foundry-toolchain@v1" | |
with: | |
version: nightly | |
- name: "Install pnpm" | |
uses: "pnpm/action-setup@v4" | |
with: | |
version: 9.5.0 | |
run_install: true | |
- name: "Install pnpm dependencies" | |
run: "pnpm install" | |
- name: "Install foundry libs" | |
run: "forge install" | |
- name: "Build the contracts" | |
run: "pnpm build" | |
- name: "Show the Foundry config" | |
run: "forge config" | |
- name: "Run the fork tests for Sepolia" | |
run: "pnpm test:sepolia -vvv" | |
- name: "Add test summary" | |
run: | | |
echo "## Tests result" >> $GITHUB_STEP_SUMMARY | |
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY | |
coverage: | |
needs: ["test"] | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Check out the repo" | |
uses: "actions/checkout@v4" | |
- name: "Install Foundry" | |
uses: "foundry-rs/foundry-toolchain@v1" | |
with: | |
version: nightly | |
- name: "Install pnpm" | |
uses: "pnpm/action-setup@v4" | |
with: | |
version: 9.5.0 | |
run_install: true | |
- name: "Install pnpm dependencies" | |
run: "pnpm install" | |
- name: "Install foundry libs" | |
run: "forge install" | |
- name: "Build the contracts" | |
run: "pnpm build" | |
# Generate coverage report | |
- name: Run coverage | |
run: pnpm test:coverage:sepolia --report summary --report lcov | |
# Adjust the paths in this step to exclude specific directories from coverage analysis. | |
- name: Filter directories | |
run: | | |
sudo apt update && sudo apt install -y lcov | |
lcov --ignore-errors unused --remove lcov.info 'test/*' 'script/*' --output-file lcov.info --rc branch_coverage=1 | |
# This step automatically publishes a comprehensive coverage report as a comment on each push and | |
# removes any previous comments. | |
- name: Post coverage report | |
if: github.event_name == 'pull_request' | |
uses: romeovs/[email protected] | |
with: | |
delete-old-comments: true | |
lcov-file: ./lcov.info | |
github-token: ${{ secrets.GITHUB_TOKEN }} # Adds a coverage summary comment to the PR. | |
# This step verifies that the minimum coverage threshold is met and fails if it is not. | |
- name: Verify minimum coverage | |
uses: zgosalvez/github-actions-report-lcov@v4 | |
with: | |
coverage-files: ./lcov.info | |
minimum-coverage: 80 # Set coverage threshold. |