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
67 changes: 67 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Checks

on:
pull_request: # push is handled in the deploy workflows
branches: ["**"]
workflow_call:

jobs:
verify:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
command: [check-types, check-format, lint, test]
name: ${{ matrix.command }}
permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22

- name: Enable corepack
run: corepack enable pnpm

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
# First tries exact match with lock file hash. If not found,
# falls back to any cache starting with 'pnpm-store-'.
# This way we get exact cache on repeated runs, but can still
# use older cache as starting point when dependencies change.
restore-keys: |
${{ runner.os }}-pnpm-store-

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

- name: Authenticate to Google Cloud
id: auth
if: matrix.command == 'test'
uses: google-github-actions/auth@v2
with:
workload_identity_provider: projects/447252512630/locations/global/workloadIdentityPools/github-actions/providers/github-actions-provider
service_account: github-actions-deployer@stafftraveler.iam.gserviceaccount.com

- name: Run ${{ matrix.command }}
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
GOOGLE_CLOUD_PROJECT: stafftraveler
GOOGLE_APPLICATION_CREDENTIALS:
${{ steps.auth.outputs.credentials_file_path }}
run: pnpm ${{ matrix.command }}
Comment thread
0x80 marked this conversation as resolved.
Resolved
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ Process entire chunks at once.
**Parameters:**

- `items: T[]` - Array of items to process
- `handler: (chunk: T[], index: number) => R | Promise<R>` - Function to
process each chunk (where `index` is the zero-based chunk index)
- `handler: (chunk: T[], index: number) => R | Promise<R>` - Function to process
each chunk (where `index` is the zero-based chunk index)
- `options?: ChunkingOptions` - Optional configuration

**Returns:**
Expand Down
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
},
"scripts": {
"lint": "eslint .",
"compile": "tsc --noEmit",
"check-types": "tsc --noEmit",
"build": "tsup-node && tsc --emitDeclarationOnly && tsc-alias --verbose",
"clean": "del-cli dist tsconfig.tsbuildinfo",
"test": "echo \"No test specified\"",
"test": "vitest run",
"prepare": "pnpm clean && pnpm build",
"prettier:format": "prettier --write .",
"prettier:check": "prettier --check ."
"format": "prettier --write .",
"check-format": "prettier --check ."
},
"author": "Thijs Koerselman",
"license": "MIT",
Expand All @@ -48,11 +48,13 @@
"del-cli": "^6.0.0",
"eslint": "^8.57.1",
"eslint-config-0x80": "^0.0.0",
"get-or-throw": "^2.1.0",
"prettier": "^3.4.2",
"prettier-plugin-jsdoc": "^1.3.2",
"tsc-alias": "^1.8.10",
"tsup": "^8.3.5",
"typescript": "^5.7.3"
"typescript": "^5.7.3",
"vitest": "^4.0.16"
},
"packageManager": "pnpm@9.0.5+sha256.61bd66913b52012107ec25a6ee4d6a161021ab99e04f6acee3aa50d0e34b4af9"
}
Loading