chore: release (#2530) #3262
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Node.js | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| 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@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Check versions | |
| run: | | |
| node --version | |
| npm --version | |
| - name: Install dependencies | |
| run: npm install --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 | |
| 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' | |
| run: npm test | |
| - name: Upload code coverage | |
| if: matrix.node-version == '24.x' && matrix.os == 'ubuntu-latest' | |
| uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 | |
| 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@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 | |
| 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 |