refactor: devnet modules; better structure; improve devnet name tests #204
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] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: ⬣ ESLint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: ⬇️ Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: 📦 Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: ⎔ Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| - name: 📦 Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: 🔬 Lint | |
| run: pnpm turbo run lint --affected | |
| typecheck: | |
| name: ʦ TypeScript | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: ⬇️ Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: 📦 Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: ⎔ Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| - name: 📦 Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: 🔎 Type check | |
| run: pnpm turbo run type-check --affected | |
| test: | |
| name: 🧪 Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: ⬇️ Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: 📦 Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: ⎔ Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| - name: 📦 Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: 🧪 Run tests | |
| run: pnpm turbo run test --affected | |
| build: | |
| name: 🏗 Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: ⬇️ Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: 📦 Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: ⎔ Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| - name: 📦 Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: 🏗 Build packages | |
| run: pnpm turbo run build --affected | |
| - name: 📄 Generate docs (validate examples) | |
| run: pnpm turbo run docgen --affected || echo "No docgen script found, skipping" | |
| # All jobs must pass | |
| ci: | |
| name: ✅ CI | |
| runs-on: ubuntu-latest | |
| if: always() | |
| needs: [lint, typecheck, test, build] | |
| steps: | |
| - name: ✅ All jobs passed | |
| if: ${{ !(contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) }} | |
| run: exit 0 | |
| - name: ❌ Some jobs failed | |
| if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} | |
| run: exit 1 |