-
Notifications
You must be signed in to change notification settings - Fork 115
46 lines (42 loc) · 1.22 KB
/
Copy pathunit.yml
File metadata and controls
46 lines (42 loc) · 1.22 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
name: Unit Test
on:
push:
branches:
- 'main'
pull_request:
permissions:
contents: read
jobs:
unit:
runs-on: ubuntu-latest
strategy:
matrix:
node: [18, 20, 22, 24]
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-node
with:
node-version: ${{ matrix.node }}
- name: Test
env:
STREAM_APP_ID: ${{ secrets.STREAM_APP_ID }}
STREAM_API_KEY: ${{ secrets.STREAM_API_KEY }}
STREAM_API_SECRET: ${{ secrets.STREAM_API_SECRET }}
run: yarn run test-unit-node
# Node 16 can't run Yarn 4 or tsx (both require Node >= 18), so we install
# dependencies on a supported Node version and then switch to Node 16 to run
# the suite through Babel (see babel-register.js).
unit-node16:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-node
- uses: actions/setup-node@v6
with:
node-version: 16
- name: Test
env:
STREAM_APP_ID: ${{ secrets.STREAM_APP_ID }}
STREAM_API_KEY: ${{ secrets.STREAM_API_KEY }}
STREAM_API_SECRET: ${{ secrets.STREAM_API_SECRET }}
run: npm run test-unit-node16