Skip to content

[Feature]: CI pipeline — contracts and frontend quality gates #16

@luchobonatti

Description

@luchobonatti

User story / Problem statement

Every push and PR should automatically validate that contracts compile and tests pass, and that the frontend has no type errors or lint violations. No broken code should land in main.

Proposed solution

# .github/workflows/ci.yml
on: [push, pull_request]

jobs:
  contracts:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@<sha>  # pin to SHA
      - uses: pnpm/action-setup@<sha>
      - run: pnpm install
      - run: cd packages/hardhat && pnpm lint        # solhint
      - run: cd packages/hardhat && pnpm test        # hardhat + @fhevm/mock-utils
      - run: cd packages/hardhat && pnpm coverage    # solidity-coverage

  frontend:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@<sha>
      - uses: pnpm/action-setup@<sha>
      - run: pnpm install
      - run: cd packages/nextjs && pnpm check-types  # tsc --noEmit
      - run: cd packages/nextjs && pnpm lint         # oxlint
      - run: cd packages/nextjs && pnpm test         # vitest

Acceptance criteria

  • CI runs on every push and PR
  • contracts job: solhint + hardhat test + coverage pass
  • frontend job: tsc + oxlint + vitest pass
  • No Docker required (mock coprocessor handles FHE in tests)
  • All GitHub Actions pinned to SHA hashes with version comments
  • CI badge added to README
  • prek install pre-commit hooks configured (.prek.yml at repo root)

Technical notes

  • Use @fhevm/mock-utils 0.4.2 for contract tests — no live network needed
  • GitHub Actions linted with actionlint locally before commit
  • Reference: docs/PRD.md §14.5, §14.6

Dependencies


Part of Epic #15 — Infra

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinfraCI/CD, deploy, tooling

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions