Skip to content

fix(cli-test): invoke commands without shell intermediate #3393

fix(cli-test): invoke commands without shell intermediate

fix(cli-test): invoke commands without shell intermediate #3393

Workflow file for this run

name: Node.js
on:
push:
branches:
- main
pull_request:
env:
LATEST_SUPPORTED_NODE: "24.x"
jobs:
test:
timeout-minutes: 6
strategy:
fail-fast: false
matrix:
os:
- "ubuntu-latest"
- "windows-latest"
node-version:
- "18.x"
- "20.x"
- "22.x"
- "24.x"
runs-on: ${{ matrix.os }}
permissions:
contents: read
steps:
- name: Configure git settings (Windows)
if: matrix.os == 'windows-latest'
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
- name: Check versions
run: |
node --version
npm --version
- name: Install dependencies
run: npm ci --verbose
- name: Build packages
run: |
# Build packages without internal dependencies
npm run build --workspace=@slack/cli-hooks
npm run build --workspace=@slack/cli-test
# Build base dependencies
npm run build --workspace=@slack/logger
npm run build --workspace=@slack/types
# Build packages requiring base dependencies
npm run build --workspace=@slack/web-api
npm run build --workspace=@slack/webhook
# Build packages that depend on the Web API
npm run build --workspace=@slack/oauth
npm run build --workspace=@slack/rtm-api
npm run build --workspace=@slack/socket-mode
- name: Lint
run: npm run lint
- name: Build docs
if: matrix.node-version == env.LATEST_SUPPORTED_NODE
run: npm run docs
- 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 == env.LATEST_SUPPORTED_NODE && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
fail_ci_if_error: true
files: packages/*/lcov.info
flags: cli-hooks,cli-test,logger,oauth,socket-mode,web-api,webhook
report_type: coverage
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
fail_ci_if_error: true
files: packages/cli-hooks/test-results.xml,packages/cli-test/test-results.xml,packages/logger/test-results.xml,packages/oauth/test-results.xml,packages/socket-mode/test-results.xml,packages/web-api/test-results.xml,packages/webhook/test-results.xml
flags: ${{ matrix.node-version }},${{ matrix.os }}
report_type: test_results
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true