1# Fail the build if Stream is unreachable or the API keys are wrong.
2name: Stream check
3
4on: [push, pull_request]
5
6jobs:
7 stream-check:
8 runs-on: ubuntu-latest
9 steps:
10 - name: Install the Stream CLI
11 run: curl -fsSL https://getstream.io/cli.sh | bash
12
13 - name: Write Stream credentials
14 run: |
15 mkdir -p .stream
16 cat > .stream/creds.yaml <<EOF
17 key: ${{ secrets.STREAM_API_KEY }}
18 secret: ${{ secrets.STREAM_API_SECRET }}
19 EOF
20
21 - name: Check credentials and reachability
22 run: getstream api GetApp --jq '.app.name'
23
24 - name: Smoke-test the Chat API
25 run: getstream api QueryChannels --jq '.channels | length'