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
4 changes: 4 additions & 0 deletions .changeset/simple-tests-shine.md
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔭 note: I'm so curious for what happens to this file in upcoming releases!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same! originally I thought of adding a patch to each package but that would be inaccurate because this does not actually have any effect on what the user consumes

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
---

ci: simplify test scripts and separate coverage from test runs
17 changes: 10 additions & 7 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- main
pull_request:

env:
LATEST_SUPPORTED_NODE: "24.x"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧠 praise: Super nice to surface this clear!


jobs:
test:
timeout-minutes: 6
Expand Down Expand Up @@ -63,16 +66,16 @@ jobs:
- name: Lint
run: npm run lint
- name: Build docs
Comment thread
WilliamBergamin marked this conversation as resolved.
if: matrix.node-version == env.LATEST_SUPPORTED_NODE
run: npm run docs
- name: Run tests (Node 18/20)
if: matrix.node-version != '22.x' && matrix.node-version != '24.x'
# Node 18 lacks --test-reporter; Node 20 has coverage bugs. Use simpler script.
run: npm run test:node18 --workspaces --if-present
- name: Run tests (Node 22+)
if: matrix.node-version == '22.x' || matrix.node-version == '24.x'
- name: Run tests
if: matrix.node-version != env.LATEST_SUPPORTED_NODE
run: npm test
- name: Run test coverage
if: matrix.node-version == env.LATEST_SUPPORTED_NODE
run: npm run test:coverage
- name: Upload code coverage
if: matrix.node-version == '24.x' && matrix.os == 'ubuntu-latest'
if: matrix.node-version == env.LATEST_SUPPORTED_NODE && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
fail_ci_if_error: true
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"lint": "npx @biomejs/biome check packages",
"lint:fix": "npx @biomejs/biome check --write packages",
"test": "npm test --workspaces --if-present",
"test:coverage": "npm run test:coverage --workspaces --if-present",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏆 praise: These patterns are joined well here!

"version": "npm run changeset version && npm install && npm run docs"
},
"devDependencies": {
Expand Down
5 changes: 2 additions & 3 deletions packages/cli-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@
"scripts": {
"build": "shx chmod +x src/*.js",
"prelint": "tsc --noemit --module es2022 --maxNodeModuleJsDepth 0 --project ./jsconfig.json",
"test": "npm run test:unit",
"test:node18": "bash -c 'node --test --test-reporter=spec src/*.test.js'",
"test:unit": "node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=test-results.xml --test src/*.test.js"
"test": "bash -c 'node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=test-results.xml --test src/*.test.js'",
Comment thread
WilliamBergamin marked this conversation as resolved.
"test:coverage": "node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=test-results.xml --test src/*.test.js"
},
"bin": {
"slack-cli-check-update": "src/check-update.js",
Expand Down
5 changes: 2 additions & 3 deletions packages/cli-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@
"build:clean": "shx rm -rf ./dist",
"docs": "npx typedoc --plugin typedoc-plugin-markdown",
"prepack": "npm run build",
"test": "npm run test:unit",
"test:node18": "npm run build && cross-env SLACK_CLI_PATH=/doesnt/matter bash -O globstar -c 'node --test --test-reporter=spec --import tsx src/**/*.test.ts'",
"test:unit": "npm run build && cross-env SLACK_CLI_PATH=/doesnt/matter node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/**/*.test.ts"
"test": "npm run build && bash -c 'cross-env SLACK_CLI_PATH=/doesnt/matter node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/**/*.test.ts'",
"test:coverage": "npm run build && cross-env SLACK_CLI_PATH=/doesnt/matter node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/**/*.test.ts"
},
"dependencies": {
"tree-kill": "^1.2.2",
Expand Down
5 changes: 2 additions & 3 deletions packages/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@
"build:clean": "shx rm -rf ./dist",
"docs": "npx typedoc --plugin typedoc-plugin-markdown",
"prepack": "npm run build",
"test": "npm run test:unit",
"test:node18": "npm run build && node --test --test-reporter=spec --import tsx --test src/index.test.ts",
"test:unit": "npm run build && node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/index.test.ts"
"test": "npm run build && node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/index.test.ts",
"test:coverage": "npm run build && node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/index.test.ts"
},
"dependencies": {
"@types/node": ">=18"
Expand Down
5 changes: 2 additions & 3 deletions packages/oauth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@
"build:clean": "shx rm -rf ./dist",
"docs": "npx typedoc --plugin typedoc-plugin-markdown",
"prepack": "npm run build",
"test": "npm run test:unit",
"test:node18": "npm run build && bash -O globstar -c 'node --test --test-reporter=spec --import tsx src/**/*.test.ts'",
"test:unit": "npm run build && node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/**/*.test.ts",
"test": "npm run build && bash -c 'node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/**/*.test.ts'",
"test:coverage": "npm run build && node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/**/*.test.ts",
"watch": "npx nodemon --watch 'src' --ext 'ts' --exec npm run build"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/socket-mode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
"docs": "npx typedoc --plugin typedoc-plugin-markdown",
"prepack": "npm run build",
"test": "npm run test:unit && npm run test:integration",
"test:node18": "npm run build && bash -c 'node --test --test-reporter=spec --import tsx src/*.test.ts' && npm run test:integration",
"test:coverage": "npm run build && node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/*.test.ts",
"test:integration": "npm run build && node --import tsx --test test/integration.test.js",
"test:unit": "npm run build && node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/*.test.ts",
"test:unit": "npm run build && bash -c 'node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/*.test.ts'",
"watch": "npx nodemon --watch 'src' --ext 'ts' --exec npm test"
},
"dependencies": {
Expand Down
3 changes: 1 addition & 2 deletions packages/web-api/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@ expectAssignable<Parameters<typeof web.chat.appendStream>>([
## Testing

```bash
npm test --workspace=packages/web-api # all tests
npm run test:unit --workspace=packages/web-api # unit only
npm test --workspace=packages/web-api # all tests
npm run test:types --workspace=packages/web-api # tsd only
```

Expand Down
5 changes: 2 additions & 3 deletions packages/web-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,11 @@
"build:clean": "shx rm -rf ./dist",
"docs": "npx typedoc --plugin typedoc-plugin-markdown",
"prepack": "npm run build",
"test": "npm run test:unit",
"test:node18": "npm run build && bash -c 'node --test --test-reporter=spec --import tsx src/*.test.ts'",
"test": "npm run build && bash -c 'node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/*.test.ts'",
"test:coverage": "npm run build && node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/*.test.ts",
"test:integration": "npm run build && node test/integration/commonjs-project/index.js && node test/integration/esm-project/index.mjs && npm run test:integration:ts",
"test:integration:ts": "cd test/integration/ts-4.7-project && npm i && npm run build",
"test:types": "tsd",
"test:unit": "npm run build && node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/*.test.ts",
"watch": "npx nodemon --watch 'src' --ext 'ts' --exec npm run build"
},
"dependencies": {
Expand Down
5 changes: 2 additions & 3 deletions packages/webhook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@
"build:clean": "shx rm -rf ./dist",
"docs": "npx typedoc --plugin typedoc-plugin-markdown",
"prepack": "npm run build",
"test": "npm run test:unit",
"test:node18": "npm run build && node --test --test-reporter=spec --import tsx --test src/IncomingWebhook.test.ts",
"test:unit": "npm run build && node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/IncomingWebhook.test.ts"
"test": "npm run build && node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/IncomingWebhook.test.ts",
"test:coverage": "npm run build && node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/IncomingWebhook.test.ts"
},
"dependencies": {
"@slack/types": "^2.20.1",
Expand Down