Skip to content

Samples Integration Type-checking #2388

Samples Integration Type-checking

Samples Integration Type-checking #2388

Workflow file for this run

# This workflow runs a TypeScript compilation against slack sample apps built on top of bolt-js
name: Samples Integration Type-checking
on:
push:
branches:
- main
pull_request:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
examples:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version:
- 20.x
- 22.x
- 24.x
example:
- examples/getting-started-typescript
- examples/custom-receiver
permissions:
contents: read
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Package the latest changes to bolt-js
run: npm i && npm pack . && rm -rf node_modules
- name: Install example dependencies for testing
working-directory: ${{ matrix.example }}
run: npm i && npm i ../../slack-bolt-*.tgz
- name: Compile sample
working-directory: ${{ matrix.example }}
run: npm run build
samples:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version:
- 20.x
- 22.x
- 24.x
sample:
- slack-samples/bolt-ts-starter-template
- slack-samples/bolt-ts-custom-function-template
permissions:
contents: read
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
- name: Checkout bolt-js
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
path: ./bolt-js
persist-credentials: false
- name: Package the latest changes to bolt-js
working-directory: ./bolt-js
run: npm i && npm pack . && rm -rf node_modules
- name: Checkout ${{ matrix.sample }}
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
repository: ${{ matrix.sample }}
path: ./sample
persist-credentials: false
- name: Install sample dependencies for testing
working-directory: ./sample
run: npm i && npm i ../bolt-js/slack-bolt-*.tgz
- name: Compile sample
working-directory: ./sample
run: npx tsc
notifications:
name: Regression notifications
runs-on: ubuntu-latest
needs:
- examples
- samples
if: ${{ !success() && github.ref == 'refs/heads/main' && github.event_name != 'workflow_dispatch' }}
steps:
- name: Send notifications of failing tests
uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3
with:
errors: true
webhook: ${{ secrets.SLACK_REGRESSION_FAILURES_WEBHOOK_URL }}
webhook-type: webhook-trigger
payload: |
action_url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
repository: "${{ github.repository }}"