Skip to content

Commit 1e98db3

Browse files
authored
Merge branch 'main' into ale-new-block-kit-elements
2 parents c90b23d + 4af912d commit 1e98db3

17 files changed

Lines changed: 129 additions & 36 deletions

File tree

.changeset/simple-tests-shine.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
---
3+
4+
ci: simplify test scripts and separate coverage from test runs

.github/workflows/ci-build.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- main
77
pull_request:
88

9+
env:
10+
LATEST_SUPPORTED_NODE: "24.x"
11+
912
jobs:
1013
test:
1114
timeout-minutes: 6
@@ -63,16 +66,16 @@ jobs:
6366
- name: Lint
6467
run: npm run lint
6568
- name: Build docs
69+
if: matrix.node-version == env.LATEST_SUPPORTED_NODE
6670
run: npm run docs
67-
- name: Run tests (Node 18/20)
68-
if: matrix.node-version != '22.x' && matrix.node-version != '24.x'
69-
# Node 18 lacks --test-reporter; Node 20 has coverage bugs. Use simpler script.
70-
run: npm run test:node18 --workspaces --if-present
71-
- name: Run tests (Node 22+)
72-
if: matrix.node-version == '22.x' || matrix.node-version == '24.x'
71+
- name: Run tests
72+
if: matrix.node-version != env.LATEST_SUPPORTED_NODE
7373
run: npm test
74+
- name: Run test coverage
75+
if: matrix.node-version == env.LATEST_SUPPORTED_NODE
76+
run: npm run test:coverage
7477
- name: Upload code coverage
75-
if: matrix.node-version == '24.x' && matrix.os == 'ubuntu-latest'
78+
if: matrix.node-version == env.LATEST_SUPPORTED_NODE && matrix.os == 'ubuntu-latest'
7679
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
7780
with:
7881
fail_ci_if_error: true

.github/workflows/release.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,21 @@ jobs:
3232
- name: Install dependencies
3333
run: npm ci --verbose
3434

35+
- name: Build packages
36+
run: |
37+
# Build base dependencies
38+
npm run build --workspace=@slack/logger
39+
npm run build --workspace=@slack/types
40+
41+
# Build packages requiring base dependencies
42+
npm run build --workspace=@slack/web-api
43+
npm run build --workspace=@slack/webhook
44+
45+
# Build packages that depend on the Web API
46+
npm run build --workspace=@slack/oauth
47+
npm run build --workspace=@slack/rtm-api
48+
npm run build --workspace=@slack/socket-mode
49+
3550
- name: Create or update release PR
3651
id: changesets
3752
uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0
@@ -109,9 +124,30 @@ jobs:
109124
npm run build --workspace=@slack/socket-mode
110125
111126
- name: Publish to npm and create GitHub releases
127+
id: changesets
112128
uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0
113129
with:
114130
createGithubReleases: true
115131
publish: npm run changeset -- publish
116132
env:
117133
GITHUB_TOKEN: ${{ steps.credentials.outputs.token }}
134+
135+
- name: Get publication details
136+
if: steps.changesets.outputs.published == 'true'
137+
id: release
138+
run: |
139+
echo "message=$(echo "$PUBLISHED_PACKAGES" | jq -r '[.[] | "\(.name)@\(.version)"] | join(", ")')" >> "$GITHUB_OUTPUT"
140+
echo "action_url=$(echo "$PUBLISHED_PACKAGES" | jq -r '[.[] | "https://github.com/${{ github.repository }}/releases/tag/\(.name)@\(.version)"] | join("\n")')" >> "$GITHUB_OUTPUT"
141+
env:
142+
PUBLISHED_PACKAGES: ${{ steps.changesets.outputs.publishedPackages }}
143+
144+
- name: Notify Slack
145+
if: steps.changesets.outputs.published == 'true'
146+
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 # v3.0.1
147+
with:
148+
webhook: ${{ secrets.SLACK_RELEASE_ANNOUNCEMENTS_WEBHOOK_URL }}
149+
webhook-type: webhook-trigger
150+
payload: |
151+
action_url: "${{ steps.release.outputs.action_url }}"
152+
message: "${{ steps.release.outputs.message }}"
153+
repository: "${{ github.repository }}"

docs/english/reference/socket-mode/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# @slack/socket-mode v2.0.6
1+
# @slack/socket-mode v2.0.7
22

33
## Enumerations
44

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"lint": "npx @biomejs/biome check packages",
2525
"lint:fix": "npx @biomejs/biome check --write packages",
2626
"test": "npm test --workspaces --if-present",
27+
"test:coverage": "npm run test:coverage --workspaces --if-present",
2728
"version": "npm run changeset version && npm install && npm run docs"
2829
},
2930
"devDependencies": {

packages/cli-hooks/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@
3737
"scripts": {
3838
"build": "shx chmod +x src/*.js",
3939
"prelint": "tsc --noemit --module es2022 --maxNodeModuleJsDepth 0 --project ./jsconfig.json",
40-
"test": "npm run test:unit",
41-
"test:node18": "bash -c 'node --test --test-reporter=spec src/*.test.js'",
42-
"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"
40+
"test": "bash -c 'node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=test-results.xml --test src/*.test.js'",
41+
"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"
4342
},
4443
"bin": {
4544
"slack-cli-check-update": "src/check-update.js",

packages/cli-test/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@
3232
"build:clean": "shx rm -rf ./dist",
3333
"docs": "npx typedoc --plugin typedoc-plugin-markdown",
3434
"prepack": "npm run build",
35-
"test": "npm run test:unit",
36-
"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'",
37-
"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"
35+
"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'",
36+
"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"
3837
},
3938
"dependencies": {
4039
"tree-kill": "^1.2.2",

packages/logger/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@
3333
"build:clean": "shx rm -rf ./dist",
3434
"docs": "npx typedoc --plugin typedoc-plugin-markdown",
3535
"prepack": "npm run build",
36-
"test": "npm run test:unit",
37-
"test:node18": "npm run build && node --test --test-reporter=spec --import tsx --test src/index.test.ts",
38-
"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"
36+
"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",
37+
"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"
3938
},
4039
"dependencies": {
4140
"@types/node": ">=18"

packages/oauth/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@
3535
"build:clean": "shx rm -rf ./dist",
3636
"docs": "npx typedoc --plugin typedoc-plugin-markdown",
3737
"prepack": "npm run build",
38-
"test": "npm run test:unit",
39-
"test:node18": "npm run build && bash -O globstar -c 'node --test --test-reporter=spec --import tsx src/**/*.test.ts'",
40-
"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",
38+
"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'",
39+
"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",
4140
"watch": "npx nodemon --watch 'src' --ext 'ts' --exec npm run build"
4241
},
4342
"dependencies": {

0 commit comments

Comments
 (0)