-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from NillionNetwork/timhm/packaging
feat: git hooks, updated tooling, fix lints, cicd workflows
- Loading branch information
Showing
17 changed files
with
3,625 additions
and
642 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: CD | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: 'NPM tag' | ||
type: choice | ||
required: true | ||
options: | ||
- next | ||
- latest | ||
|
||
concurrency: | ||
group: "publish" | ||
cancel-in-progress: true | ||
|
||
publish-nilql: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "23" | ||
registry-url: "https://registry.npmjs.org" | ||
- uses: pnpm/action-setup@v4 | ||
- run: pnpm install | ||
- run: pnpm build | ||
- env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: pnpm --tag ${{ github.event.inputs.tag }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "23" | ||
- uses: pnpm/action-setup@v4 | ||
- run: pnpm install | ||
- run: pnpm biome ci | ||
- run: pnpm typecheck | ||
|
||
test: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "23" | ||
- uses: pnpm/action-setup@v4 | ||
- run: pnpm install | ||
- run: pnpm vitest --coverage | ||
- uses: davelosert/vitest-coverage-report-action@v2 | ||
if: always() | ||
with: | ||
comment-on: "pr" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,3 +128,7 @@ dist | |
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
|
||
# ide aretefacts | ||
.vscode | ||
.idea |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", | ||
"vcs": { | ||
"enabled": true, | ||
"clientKind": "git", | ||
"useIgnoreFile": true | ||
}, | ||
"files": { | ||
"ignoreUnknown": false, | ||
"include": ["**/*.ts", "**/*.mjs", "**/*.json"] | ||
}, | ||
"formatter": { | ||
"enabled": true, | ||
"indentStyle": "space" | ||
}, | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true, | ||
"correctness": { | ||
"useExhaustiveDependencies": "off" | ||
}, | ||
"style": { | ||
"noNonNullAssertion": "warn" | ||
} | ||
} | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"quoteStyle": "double", | ||
"trailingCommas": "all" | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { RuleConfigSeverity, type UserConfig } from "@commitlint/types"; | ||
|
||
const config: UserConfig = { | ||
extends: ["@commitlint/config-conventional"], | ||
rules: { | ||
"body-max-line-length": [ | ||
RuleConfigSeverity.Disabled, | ||
"always", | ||
Number.POSITIVE_INFINITY, | ||
], | ||
}, | ||
}; | ||
|
||
export default config; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
pre-commit: | ||
commands: | ||
biome-format: | ||
glob: "*.{ts,json,jsonc}" | ||
run: pnpm exec biome format --write --no-errors-on-unmatched --files-ignore-unknown=true --colors=off {staged_files} | ||
stage_fixed: true | ||
|
||
commit-msg: | ||
commands: | ||
lint-commit-msg: | ||
run: pnpm commitlint --edit | ||
|
||
pre-push: | ||
commands: | ||
biome-check: | ||
glob: "*.{ts,json,jsonc}" | ||
run: pnpm biome check --no-errors-on-unmatched --files-ignore-unknown=true --colors=off {push_files} | ||
tsc-check: | ||
glob: "*.{ts}" | ||
run: pnpm exec tsc | ||
test: | ||
glob: "*.{ts}" | ||
run: pnpm test |
Oops, something went wrong.