Skip to content

Samples Integration Type-checking #1460

Samples Integration Type-checking

Samples Integration Type-checking #1460

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: [18.x, 20.x, 22.x]
example:
- examples/getting-started-typescript
- examples/custom-receiver
permissions:
contents: read
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.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: [18.x, 20.x, 22.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@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ matrix.node-version }}
- name: Checkout bolt-js
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.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@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.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@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
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 }}"