diff --git a/.github/actions/detect-workspace-changes/action.yaml b/.github/actions/detect-workspace-changes/action.yaml new file mode 100644 index 00000000..4cf4bd58 --- /dev/null +++ b/.github/actions/detect-workspace-changes/action.yaml @@ -0,0 +1,114 @@ +name: Detect Workspace Changes +description: Detects which workspace packages have changed using pnpm +outputs: + changed_workspaces: + description: "Space-separated list of changed workspace paths" + value: ${{ steps.detect.outputs.changed_workspaces }} + changed_workspaces_json: + description: "JSON array of changed workspace paths" + value: ${{ steps.detect.outputs.changed_workspaces_json }} + all_workspaces: + description: "JSON array of all workspace paths" + value: ${{ steps.detect.outputs.all_workspaces }} + has_changes: + description: "Whether any workspaces have changes" + value: ${{ steps.detect.outputs.has_changes }} + +runs: + using: composite + steps: + - name: Detect changed workspaces + id: detect + shell: bash + run: | + set -e + + # Determine base commit for comparison + if [[ "${{ github.event_name }}" == "pull_request" ]]; then + base_ref="${{ github.event.pull_request.base.sha }}" + else + # For push events, compare with previous commit + if git rev-parse HEAD~1 >/dev/null 2>&1; then + base_ref="HEAD~1" + else + # First commit in repository + base_ref="" + fi + fi + + echo "Base ref: $base_ref" + echo "" + + # Use pnpm to detect changed workspaces + if [[ -n "$base_ref" ]]; then + # Get list of changed workspaces using pnpm --filter + # The [...$base_ref] syntax filters to packages that have changes since base_ref + changed_output=$(pnpm list --recursive --depth -1 --filter "...[${base_ref}]" --json 2>/dev/null || echo "[]") + else + # First commit - all workspaces are considered changed + changed_output=$(pnpm list --recursive --depth -1 --json 2>/dev/null || echo "[]") + fi + + echo "Changed packages output:" + echo "$changed_output" | jq . + echo "" + + # Extract workspace paths from pnpm output + changed_workspaces=$(echo "$changed_output" | jq -r '.[].path // empty' | sed "s|^$PWD/||" || echo "") + + # Convert to array + readarray -t changed_array <<< "$changed_workspaces" + + # Filter out empty entries + filtered_changed=() + for ws in "${changed_array[@]}"; do + if [[ -n "$ws" ]]; then + filtered_changed+=("$ws") + echo "✓ Changed: $ws" + fi + done + + echo "" + + # Get all workspaces for reference + all_output=$(pnpm list --recursive --depth -1 --json 2>/dev/null || echo "[]") + all_workspaces=$(echo "$all_output" | jq -r '.[].path // empty' | sed "s|^$PWD/||" || echo "") + + # Output results + if [[ ${#filtered_changed[@]} -eq 0 ]]; then + echo "No workspace changes detected" + echo "changed_workspaces=" >> "$GITHUB_OUTPUT" + echo "changed_workspaces_json=[]" >> "$GITHUB_OUTPUT" + echo "has_changes=false" >> "$GITHUB_OUTPUT" + else + echo "Changed workspaces: ${filtered_changed[*]}" + # Output as space-separated string + echo "changed_workspaces=${filtered_changed[*]}" >> "$GITHUB_OUTPUT" + # Output as JSON array (compact format, no newlines) + json_array=$(printf '%s\n' "${filtered_changed[@]}" | jq -R . | jq -s -c .) + echo "changed_workspaces_json=$json_array" >> "$GITHUB_OUTPUT" + echo "has_changes=true" >> "$GITHUB_OUTPUT" + fi + + # Output all workspaces for reference (compact format, no newlines) + all_workspaces_json=$(echo "$all_workspaces" | grep -v '^$' | jq -R . | jq -s -c . || echo "[]") + echo "all_workspaces=$all_workspaces_json" >> "$GITHUB_OUTPUT" + + - name: Display detection results + shell: bash + run: | + echo "## Workspace Change Detection Results" >> "$GITHUB_STEP_SUMMARY" + echo "" >> "$GITHUB_STEP_SUMMARY" + + if [[ "${{ steps.detect.outputs.has_changes }}" == "true" ]]; then + echo "### Changed Workspaces" >> "$GITHUB_STEP_SUMMARY" + echo "" >> "$GITHUB_STEP_SUMMARY" + echo '${{ steps.detect.outputs.changed_workspaces_json }}' | jq -r '.[] | "- `" + . + "`"' >> "$GITHUB_STEP_SUMMARY" + else + echo "No workspace changes detected." >> "$GITHUB_STEP_SUMMARY" + fi + + echo "" >> "$GITHUB_STEP_SUMMARY" + echo "### All Workspaces" >> "$GITHUB_STEP_SUMMARY" + echo "" >> "$GITHUB_STEP_SUMMARY" + echo '${{ steps.detect.outputs.all_workspaces }}' | jq -r '.[] | "- `" + . + "`"' >> "$GITHUB_STEP_SUMMARY" diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index a2515661..18f3fcdc 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -14,13 +14,36 @@ concurrency: cancel-in-progress: true jobs: + detect-changes: + runs-on: ubuntu-latest + outputs: + changed_workspaces: ${{ steps.detect.outputs.changed_workspaces }} + changed_workspaces_json: ${{ steps.detect.outputs.changed_workspaces_json }} + all_workspaces: ${{ steps.detect.outputs.all_workspaces }} + has_changes: ${{ steps.detect.outputs.has_changes }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: ./.github/actions/setup-mise + + - id: detect + uses: ./.github/actions/detect-workspace-changes + test: + needs: detect-changes + if: needs.detect-changes.outputs.has_changes == 'true' runs-on: ubuntu-latest permissions: contents: read issues: read checks: write pull-requests: write + strategy: + fail-fast: false + matrix: + workspace: ${{ fromJson(needs.detect-changes.outputs.changed_workspaces_json) }} services: rabbitmq: image: rabbitmq @@ -58,32 +81,60 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/setup-mise - - run: mise run test:deno -- --coverage=.cov --junit-path=.test-report.xml + - name: Run Deno tests for ${{ matrix.workspace }} + working-directory: ${{ matrix.workspace }} + run: | + if [[ -f "deno.json" ]] || [[ -f "deno.jsonc" ]]; then + mise run codegen || true + # Run all tests in this workspace directory (not parent workspaces) + # Exit successfully even if no tests are found + deno test --check --doc --allow-all --unstable-kv --trace-leaks --parallel \ + --coverage=.cov --junit-path=.test-report.xml || { + exit_code=$? + if [[ $exit_code -eq 1 ]]; then + # Exit code 1 might mean no tests found, check if test files exist + if ! find . -name "*_test.ts" -o -name "*_test.tsx" -o -name "*.test.ts" 2>/dev/null | grep -q .; then + echo "No test files found in ${{ matrix.workspace }}, skipping" + exit 0 + fi + fi + exit $exit_code + } + else + echo "No deno.json found in ${{ matrix.workspace }}, skipping" + fi env: RUST_BACKTRACE: ${{ runner.debug }} LOG: ${{ runner.debug && 'always' || '' }} - uses: dorny/test-reporter@v2 if: success() || failure() with: - name: "Test Results (${{ matrix.os }})" - path: .test-report.xml + name: "Test Results (Deno) - ${{ matrix.workspace }}" + path: ${{ matrix.workspace }}/.test-report.xml reporter: jest-junit continue-on-error: true - if: '!cancelled()' uses: codecov/test-results-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} - files: .test-report.xml - - run: deno coverage --lcov .cov > .cov.lcov + files: ${{ matrix.workspace }}/.test-report.xml + continue-on-error: true + - run: deno coverage --lcov ${{ matrix.workspace }}/.cov > ${{ matrix.workspace }}/.cov.lcov continue-on-error: true - uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} - files: .cov.lcov + files: ${{ matrix.workspace }}/.cov.lcov continue-on-error: true test-node: + needs: detect-changes + if: needs.detect-changes.outputs.has_changes == 'true' runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + workspace: ${{ fromJson(needs.detect-changes.outputs.changed_workspaces_json) }} services: rabbitmq: image: rabbitmq @@ -121,10 +172,18 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/setup-mise - - run: mise run test:node + - name: Run Node.js tests for ${{ matrix.workspace }} + run: pnpm --filter "${{ matrix.workspace }}" test + continue-on-error: true test-bun: + needs: detect-changes + if: needs.detect-changes.outputs.has_changes == 'true' runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + workspace: ${{ fromJson(needs.detect-changes.outputs.changed_workspaces_json) }} services: rabbitmq: image: rabbitmq @@ -162,9 +221,13 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/setup-mise - - run: mise run test:bun + - name: Run Bun tests for ${{ matrix.workspace }} + run: pnpm --filter "${{ matrix.workspace }}" test:bun + continue-on-error: true test-cfworkers: + needs: detect-changes + if: contains(needs.detect-changes.outputs.changed_workspaces, 'packages/fedify') runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -172,12 +235,66 @@ jobs: - run: deno task test:cfworkers working-directory: ${{ github.workspace }}/packages/fedify/ + test-cli-init: + needs: detect-changes + if: contains(needs.detect-changes.outputs.changed_workspaces, 'packages/cli') + runs-on: ubuntu-latest + services: + rabbitmq: + image: rabbitmq + env: + RABBITMQ_DEFAULT_USER: guest + RABBITMQ_DEFAULT_PASS: guest + ports: + - 5672:5672 + postgres: + image: postgres + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: postgres + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 5432:5432 + redis: + image: redis + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 6379:6379 + env: + AMQP_URL: amqp://guest:guest@localhost:5672 + DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres + REDIS_URL: redis://localhost:6379 + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup-mise + - name: Run deno task test-init for @fedify/cli + run: | + cd packages/cli + deno task test-init + lint: + needs: detect-changes + if: needs.detect-changes.outputs.has_changes == 'true' runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + workspace: ${{ fromJson(needs.detect-changes.outputs.changed_workspaces_json) }} steps: - uses: actions/checkout@v4 - uses: ./.github/actions/setup-mise - - run: mise run check + - name: Run lint/check for ${{ matrix.workspace }} + run: pnpm --filter "${{ matrix.workspace }}" check + continue-on-error: true release-test: runs-on: ubuntu-latest @@ -198,8 +315,8 @@ jobs: # =========================================================================== build-cli-pr: - if: github.event_name == 'pull_request' - needs: [release-test] + if: github.event_name == 'pull_request' && contains(needs.detect-changes.outputs.changed_workspaces, 'packages/cli') + needs: [release-test, detect-changes] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -215,8 +332,8 @@ jobs: packages/cli/fedify-cli-*.zip build-docs-pr: - if: github.event_name == 'pull_request' - needs: [release-test] + if: github.event_name == 'pull_request' && contains(needs.detect-changes.outputs.changed_workspaces, 'docs') + needs: [release-test, detect-changes] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -255,8 +372,11 @@ jobs: # =========================================================================== build-cli: - if: github.event_name == 'push' - needs: [test, test-node, test-bun, test-cfworkers, lint, release-test, determine-version] + if: | + github.event_name == 'push' && + (success() || + (needs.test.result == 'skipped' && needs.test-node.result == 'skipped' && needs.test-bun.result == 'skipped' && needs.lint.result == 'skipped')) + needs: [test, test-node, test-bun, test-cfworkers, lint, release-test, determine-version, detect-changes] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -273,16 +393,23 @@ jobs: packages/cli/fedify-cli-*.zip build-packages: - if: github.event_name == 'push' - needs: [test, test-node, test-bun, test-cfworkers, lint, release-test, determine-version] + if: | + github.event_name == 'push' && + (success() || + (needs.test.result == 'skipped' && needs.test-node.result == 'skipped' && needs.test-bun.result == 'skipped' && needs.lint.result == 'skipped')) + needs: [test, test-node, test-bun, test-cfworkers, lint, release-test, determine-version, detect-changes] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: ./.github/actions/setup-mise - uses: ./.github/actions/determine-version - run: sudo npm install -g npm@latest && npm --version - - run: | + - name: Pack all packages + run: | pnpm pack --recursive --filter='!./examples/**' + # Remove private packages for pkg in fedify-*.tgz; do if tar -xOzf "$pkg" package/package.json | jq -e '.private == true' > /dev/null 2>&1; then @@ -291,7 +418,7 @@ jobs: fi done if [[ "$GITHUB_REF_TYPE" != tag ]]; then - rm fedify-cli-*.tgz + rm fedify-cli-*.tgz 2>/dev/null || true fi - uses: actions/upload-artifact@v4 with: @@ -299,8 +426,11 @@ jobs: path: fedify-*.tgz publish-jsr: - if: github.event_name == 'push' - needs: [test, test-node, test-bun, test-cfworkers, lint, release-test, determine-version] + if: | + github.event_name == 'push' && + (success() || + (needs.test.result == 'skipped' && needs.test-node.result == 'skipped' && needs.test-bun.result == 'skipped' && needs.lint.result == 'skipped')) + needs: [test, test-node, test-bun, test-cfworkers, lint, release-test, determine-version, detect-changes] runs-on: ubuntu-latest permissions: id-token: write diff --git a/packages/amqp/deno.json b/packages/amqp/deno.json index ab7c3c15..a79670b8 100644 --- a/packages/amqp/deno.json +++ b/packages/amqp/deno.json @@ -17,7 +17,9 @@ "pnpm-lock.yaml" ], "publish": { - "exclude": ["**/*.test.ts"] + "exclude": [ + "**/*.test.ts" + ] }, "tasks": { "build": "pnpm build", @@ -42,5 +44,12 @@ "test:bun" ] } + }, + "test": { + "include": [ + "./**/*_test.ts", + "./**/*_test.tsx", + "./**/*.test.ts" + ] } } diff --git a/packages/cfworkers/deno.json b/packages/cfworkers/deno.json index 4ada84af..78394e0a 100644 --- a/packages/cfworkers/deno.json +++ b/packages/cfworkers/deno.json @@ -14,7 +14,9 @@ "test" ], "publish": { - "exclude": ["**/*.test.ts"] + "exclude": [ + "**/*.test.ts" + ] }, "tasks": { "check": "deno fmt --check && deno lint && deno check src/*.ts" diff --git a/packages/denokv/deno.json b/packages/denokv/deno.json index 7f78f8c3..cbfd6bd8 100644 --- a/packages/denokv/deno.json +++ b/packages/denokv/deno.json @@ -14,10 +14,19 @@ "node_modules" ], "publish": { - "exclude": ["**/*.test.ts"] + "exclude": [ + "**/*.test.ts" + ] }, "tasks": { "check": "deno fmt --check && deno lint && deno check src/*.ts", "test": "deno test --allow-net --allow-env" + }, + "test": { + "include": [ + "./**/*_test.ts", + "./**/*_test.tsx", + "./**/*.test.ts" + ] } } diff --git a/packages/elysia/deno.json b/packages/elysia/deno.json index 7e796b7f..94ebb284 100644 --- a/packages/elysia/deno.json +++ b/packages/elysia/deno.json @@ -10,9 +10,18 @@ "node_modules" ], "publish": { - "exclude": ["**/*.test.ts"] + "exclude": [ + "**/*.test.ts" + ] }, "tasks": { "check": "deno fmt --check && deno lint && deno check src/*.ts" + }, + "test": { + "include": [ + "./**/*_test.ts", + "./**/*_test.tsx", + "./**/*.test.ts" + ] } } diff --git a/packages/express/deno.json b/packages/express/deno.json index 0795c20c..254e69f3 100644 --- a/packages/express/deno.json +++ b/packages/express/deno.json @@ -13,9 +13,18 @@ "node_modules" ], "publish": { - "exclude": ["**/*.test.ts"] + "exclude": [ + "**/*.test.ts" + ] }, "tasks": { "check": "deno fmt --check && deno lint && deno check *.ts" + }, + "test": { + "include": [ + "./**/*_test.ts", + "./**/*_test.tsx", + "./**/*.test.ts" + ] } } diff --git a/packages/fastify/deno.json b/packages/fastify/deno.json index da694741..c22869aa 100644 --- a/packages/fastify/deno.json +++ b/packages/fastify/deno.json @@ -14,10 +14,19 @@ "node_modules" ], "publish": { - "exclude": ["**/*.test.ts"] + "exclude": [ + "**/*.test.ts" + ] }, "tasks": { "check": "deno fmt --check && deno lint && deno check src/*.ts", "test": "deno test --allow-all" + }, + "test": { + "include": [ + "./**/*_test.ts", + "./**/*_test.tsx", + "./**/*.test.ts" + ] } } diff --git a/packages/fedify/deno.json b/packages/fedify/deno.json index 49cc8c9f..6858c9d9 100644 --- a/packages/fedify/deno.json +++ b/packages/fedify/deno.json @@ -123,5 +123,12 @@ "test:cfworkers" ] } + }, + "test": { + "include": [ + "./**/*_test.ts", + "./**/*_test.tsx", + "./**/*.test.ts" + ] } } diff --git a/packages/fixture/deno.json b/packages/fixture/deno.json index 6d73f088..528e814d 100644 --- a/packages/fixture/deno.json +++ b/packages/fixture/deno.json @@ -12,5 +12,12 @@ "tasks": { "check": "deno fmt --check && deno lint && deno check src/*.ts" }, - "publish": false + "publish": false, + "test": { + "include": [ + "./**/*_test.ts", + "./**/*_test.tsx", + "./**/*.test.ts" + ] + } } diff --git a/packages/fresh/deno.json b/packages/fresh/deno.json index d8b40226..848bfd66 100644 --- a/packages/fresh/deno.json +++ b/packages/fresh/deno.json @@ -14,9 +14,18 @@ "node_modules" ], "publish": { - "exclude": ["**/*.test.ts"] + "exclude": [ + "**/*.test.ts" + ] }, "tasks": { "check": "deno fmt --check && deno lint && deno check src/*.ts" + }, + "test": { + "include": [ + "./**/*_test.ts", + "./**/*_test.tsx", + "./**/*.test.ts" + ] } } diff --git a/packages/h3/deno.json b/packages/h3/deno.json index c002581d..5a1f183d 100644 --- a/packages/h3/deno.json +++ b/packages/h3/deno.json @@ -10,9 +10,18 @@ "node_modules" ], "publish": { - "exclude": ["**/*.test.ts"] + "exclude": [ + "**/*.test.ts" + ] }, "tasks": { "check": "deno fmt --check && deno lint && deno check src/*.ts" + }, + "test": { + "include": [ + "./**/*_test.ts", + "./**/*_test.tsx", + "./**/*.test.ts" + ] } } diff --git a/packages/hono/deno.json b/packages/hono/deno.json index 95962e2c..7ddc9aa9 100644 --- a/packages/hono/deno.json +++ b/packages/hono/deno.json @@ -13,10 +13,19 @@ "node_modules" ], "publish": { - "exclude": ["**/*.test.ts"] + "exclude": [ + "**/*.test.ts" + ] }, "tasks": { "check": "deno fmt --check && deno lint && deno check src/*.ts", "test": "deno test --allow-net --allow-env" + }, + "test": { + "include": [ + "./**/*_test.ts", + "./**/*_test.tsx", + "./**/*.test.ts" + ] } } diff --git a/packages/koa/deno.json b/packages/koa/deno.json index e454b2f3..d17bdfcc 100644 --- a/packages/koa/deno.json +++ b/packages/koa/deno.json @@ -13,9 +13,18 @@ "node_modules" ], "publish": { - "exclude": ["**/*.test.ts"] + "exclude": [ + "**/*.test.ts" + ] }, "tasks": { "check": "deno fmt --check && deno lint && deno check src/*.ts" + }, + "test": { + "include": [ + "./**/*_test.ts", + "./**/*_test.tsx", + "./**/*.test.ts" + ] } } diff --git a/packages/lint/deno.json b/packages/lint/deno.json index c36b21d4..0d803910 100644 --- a/packages/lint/deno.json +++ b/packages/lint/deno.json @@ -10,9 +10,18 @@ "estree": "npm:@types/estree@^1.0.8" }, "publish": { - "exclude": ["**/*.test.ts"] + "exclude": [ + "**/*.test.ts" + ] }, "tasks": { "test": "deno test --allow-env" + }, + "test": { + "include": [ + "./**/*_test.ts", + "./**/*_test.tsx", + "./**/*.test.ts" + ] } } diff --git a/packages/postgres/deno.json b/packages/postgres/deno.json index 08cc9d35..eba3f154 100644 --- a/packages/postgres/deno.json +++ b/packages/postgres/deno.json @@ -12,10 +12,19 @@ "node_modules" ], "publish": { - "exclude": ["**/*.test.ts"] + "exclude": [ + "**/*.test.ts" + ] }, "tasks": { "check": "deno fmt --check && deno lint && deno check src/*.ts", "test": "deno test --allow-net --allow-env" + }, + "test": { + "include": [ + "./**/*_test.ts", + "./**/*_test.tsx", + "./**/*.test.ts" + ] } } diff --git a/packages/redis/deno.json b/packages/redis/deno.json index 9063255c..f0e88260 100644 --- a/packages/redis/deno.json +++ b/packages/redis/deno.json @@ -13,10 +13,19 @@ "node_modules" ], "publish": { - "exclude": ["**/*.test.ts"] + "exclude": [ + "**/*.test.ts" + ] }, "tasks": { "check": "deno fmt --check && deno lint && deno check src/*.ts", "test": "deno test --allow-net --allow-env --doc --no-check=leaks" + }, + "test": { + "include": [ + "./**/*_test.ts", + "./**/*_test.tsx", + "./**/*.test.ts" + ] } } diff --git a/packages/relay/deno.json b/packages/relay/deno.json index fe602ecb..46834551 100644 --- a/packages/relay/deno.json +++ b/packages/relay/deno.json @@ -13,7 +13,9 @@ "node_modules/" ], "publish": { - "exclude": ["**/*.test.ts"] + "exclude": [ + "**/*.test.ts" + ] }, "tasks": { "codegen": "deno task -f @fedify/vocab compile", @@ -39,5 +41,12 @@ "exclude": [ "src/init/templates/**" ] + }, + "test": { + "include": [ + "./**/*_test.ts", + "./**/*_test.tsx", + "./**/*.test.ts" + ] } } diff --git a/packages/sqlite/deno.json b/packages/sqlite/deno.json index 83f9a6f3..86c174d1 100644 --- a/packages/sqlite/deno.json +++ b/packages/sqlite/deno.json @@ -23,5 +23,12 @@ "tasks": { "check": "deno fmt --check && deno lint && deno check", "test": "deno test --allow-net --allow-env --doc --no-check=leaks" + }, + "test": { + "include": [ + "./**/*_test.ts", + "./**/*_test.tsx", + "./**/*.test.ts" + ] } } diff --git a/packages/sveltekit/deno.json b/packages/sveltekit/deno.json index 1b4482c9..2625cda2 100644 --- a/packages/sveltekit/deno.json +++ b/packages/sveltekit/deno.json @@ -14,10 +14,19 @@ "node_modules" ], "publish": { - "exclude": ["**/*.test.ts"] + "exclude": [ + "**/*.test.ts" + ] }, "tasks": { "check": "deno fmt --check && deno lint && deno check src/*.ts", "test": "deno test --allow-net --allow-env" + }, + "test": { + "include": [ + "./**/*_test.ts", + "./**/*_test.tsx", + "./**/*.test.ts" + ] } } diff --git a/packages/testing/deno.json b/packages/testing/deno.json index dc5fcb7e..1061bbaf 100644 --- a/packages/testing/deno.json +++ b/packages/testing/deno.json @@ -12,7 +12,9 @@ "pnpm-lock.yaml" ], "publish": { - "exclude": ["**/*.test.ts"] + "exclude": [ + "**/*.test.ts" + ] }, "tasks": { "build": "pnpm build", @@ -37,5 +39,12 @@ "test:bun" ] } + }, + "test": { + "include": [ + "./**/*_test.ts", + "./**/*_test.tsx", + "./**/*.test.ts" + ] } } diff --git a/packages/vocab-runtime/deno.json b/packages/vocab-runtime/deno.json index 4219d9db..0b4e5753 100644 --- a/packages/vocab-runtime/deno.json +++ b/packages/vocab-runtime/deno.json @@ -24,10 +24,19 @@ "node_modules" ], "publish": { - "exclude": ["**/*.test.ts"] + "exclude": [ + "**/*.test.ts" + ] }, "tasks": { "check": "deno fmt --check && deno lint && deno check src/*.ts", "test": "deno test" + }, + "test": { + "include": [ + "./**/*_test.ts", + "./**/*_test.tsx", + "./**/*.test.ts" + ] } } diff --git a/packages/vocab-tools/deno.json b/packages/vocab-tools/deno.json index 81bdce2e..df4a129f 100644 --- a/packages/vocab-tools/deno.json +++ b/packages/vocab-tools/deno.json @@ -20,10 +20,19 @@ "src/schema.yaml" ], "publish": { - "exclude": ["**/*.test.ts"] + "exclude": [ + "**/*.test.ts" + ] }, "tasks": { "check": "deno fmt --check && deno lint && deno check src/*.ts", "test": "deno test -A" + }, + "test": { + "include": [ + "./**/*_test.ts", + "./**/*_test.tsx", + "./**/*.test.ts" + ] } } diff --git a/packages/vocab/deno.json b/packages/vocab/deno.json index a7afbdb3..014e3381 100644 --- a/packages/vocab/deno.json +++ b/packages/vocab/deno.json @@ -27,5 +27,13 @@ "check": "deno fmt --check && deno lint && deno check src/*.ts", "compile": "deno run --allow-read --allow-write --allow-env --check scripts/codegen.ts && deno fmt src/vocab.ts && deno cache src/vocab.ts && deno check src/vocab.ts", "test": "deno test --allow-read --allow-write --allow-env --unstable-kv --trace-leaks --parallel" + }, + "test": { + "include": [ + "./**/*_test.ts", + "./**/*_test.tsx", + "./**/*.test.ts" + ] } } + diff --git a/packages/webfinger/deno.json b/packages/webfinger/deno.json index e49acf7d..0e82cb9d 100644 --- a/packages/webfinger/deno.json +++ b/packages/webfinger/deno.json @@ -22,5 +22,12 @@ "tasks": { "check": "deno fmt --check && deno lint && deno check src/*.ts", "test": "deno test" + }, + "test": { + "include": [ + "./**/*_test.ts", + "./**/*_test.tsx", + "./**/*.test.ts" + ] } }