Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
validate-and-test:
name: Validate, Lint, Test & Build
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v3
with:
version: 10

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

# ── Package metadata validation ───────────────────────────────────────
# publint checks for malformed exports, missing files, and other issues
# that would break consumers of the published package.
- name: Validate package metadata (publint)
run: pnpm validate

# ── Code quality ──────────────────────────────────────────────────────
- name: Lint
run: pnpm lint

- name: Type-check
run: pnpm typecheck

# ── Tests ─────────────────────────────────────────────────────────────
- name: Run unit tests
run: pnpm test:run

# ── Build ─────────────────────────────────────────────────────────────
- name: Build
run: pnpm build

# ── Smoke tests (require the built dist) ──────────────────────────────
- name: Run smoke tests
run: pnpm test:smoke
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ pnpm typecheck

# Generate TypeDoc API docs
pnpm docs

# Validate package metadata (publint — catches malformed exports, missing files, etc.)
pnpm validate
```

## 🗺️ Roadmap
Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"lint": "eslint .",
"format": "prettier --write .",
"typecheck": "tsc --noEmit",
"docs": "typedoc src/index.ts"
"docs": "typedoc src/index.ts",
"validate": "npx --yes publint"
},
"keywords": [
"web3",
Expand Down Expand Up @@ -85,8 +86,5 @@
"typedoc": "^0.25.8",
"typescript": "^5.3.3",
"vitest": "^1.3.1"
},
"dependencies": {
"js-sha3": "^0.9.3"
}
}
Loading