Skip to content
Open
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
4 changes: 4 additions & 0 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ on:
- 'typescript/packages/h402-hono/**'
- 'typescript/packages/h402-proxy/**'
jobs:
test:
uses: ./.github/workflows/test.yml

build-h402:
needs: [test]
uses: ./.github/workflows/build-library.yml
with:
name: h402
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Test

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

jobs:
test:
runs-on:
group: arc-runners

permissions:
contents: read

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: pnpm/action-setup@v4
with:
version: 10

- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Run tests
run: pnpm test

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,5 @@ fabric.properties

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

coverage/
506 changes: 500 additions & 6 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion typescript/packages/h402/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
"scripts": {
"build": "tsc && pnpm run build:paywall && tsc",
"build:paywall": "pnpm --filter 'paywall-app' i && pnpm --filter 'paywall-app' build && node ../../../scripts/build-paywall.js",
"clean": "rm -rf dist"
"clean": "rm -rf dist",
"test": "vitest run",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -98,6 +101,8 @@
],
"devDependencies": {
"@types/node": "^22.15.3",
"@vitest/coverage-v8": "4.0.8",
"vitest": "^4.0.8",
"zod": "^3.25.49"
},
"dependencies": {
Expand Down
Loading