Revamp: monorepo with contracts and frontend #1
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: 8 | |
| - 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 | |
| with: | |
| submodules: recursive | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 8 | |
| - 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 Forge dependencies | |
| run: forge install | |
| - name: Lint (Format Check) | |
| run: pnpm lint | |
| - name: Build | |
| run: pnpm build | |
| - name: Test | |
| run: pnpm test | |
| 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: 8 | |
| - 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 |