ci: authenticate foundryup release lookup against GitHub API #15
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: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| jobs: | |
| contracts: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: contracts | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| with: | |
| # Authenticate the foundryup release-tag lookup against the GitHub | |
| # API. Without this, runners can hit the 60 req/hr unauthenticated | |
| # rate limit (HTTP 403) when "stable" is resolved to a release tag. | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| version: stable | |
| - name: Install Solidity dependencies | |
| run: | | |
| forge install OpenZeppelin/openzeppelin-contracts@v5.1.0 --no-git --shallow | |
| forge install LayerZero-Labs/devtools --no-git --shallow | |
| forge install LayerZero-Labs/LayerZero-v2 --no-git --shallow | |
| - name: Forge build | |
| run: forge build | |
| - name: Forge test | |
| run: forge test -vvv | |
| backend: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: backend | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: npm | |
| cache-dependency-path: backend/package-lock.json | |
| - run: npm ci | |
| - run: npm run lint | |
| - run: npm test | |
| frontend: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - run: npm ci | |
| - run: npm run lint | |
| - run: npm run build |