Revamp: monorepo with contracts and frontend #3
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: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| frontend: | |
| name: Frontend | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: packages/frontend | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| working-directory: . | |
| - name: Lint | |
| run: pnpm lint | |
| - name: Type check and Build | |
| run: pnpm build | |
| contracts: | |
| name: Contracts | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: packages/contracts | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| - name: Install Forge dependencies | |
| run: forge install foundry-rs/forge-std@3b20d60d14b343ee4f908cb8079495c07f5e8981 Vectorized/solady@c9e079c0ca836dcc52777a1fa7227ef28e3537b3 --no-git | |
| - name: Lint (Format Check) | |
| run: forge fmt --check | |
| - name: Build | |
| run: forge build | |
| - name: Test | |
| run: forge test -vvv | |
| indexer: | |
| name: Indexer | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: packages/indexer | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| working-directory: . | |
| - name: Install Envio CLI | |
| run: npm install -g envio | |
| - name: Codegen | |
| run: pnpm codegen | |
| - name: Test | |
| run: pnpm test |