-
Notifications
You must be signed in to change notification settings - Fork 429
101 lines (99 loc) · 3.29 KB
/
samples.yml
File metadata and controls
101 lines (99 loc) · 3.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# 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
- 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@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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
- 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@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: ${{ matrix.node-version }}
- name: Checkout bolt-js
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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@af78098f536edbc4de71162a307590698245be95 # v3.0.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 }}"