chore: release (#2612) #3516
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: | |
| 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: npm run build | |
| - 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@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.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@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.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 |