Repository navigation
56 lines (47 loc) · 1.54 KB
/
Copy pathemulate.yaml
File metadata and controls
56 lines (47 loc) · 1.54 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
# The emulate.dev test tier: the Slack adapter against a local emulator. It
# lives in its own workflow so that a failure here does not mark CI red. See
# "Emulator Tests" in CONTRIBUTING.md.
name: Emulate
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
emulate:
name: emulate (slack)
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install Node
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22
- name: Install mise-pinned toolchain
uses: jdx/mise-action@6be3c7ed4c21d4f76b208d351d95aac273ebb76d # v5.2.4
- name: Start emulate
run: |
nohup mise run emulate > "$RUNNER_TEMP/emulate.log" 2>&1 &
for _ in $(seq 90); do
if curl -fsS -X POST -H 'Authorization: Bearer xoxb-emulate-bot' \
http://127.0.0.1:4710/api/auth.test > /dev/null 2>&1; then
exit 0
fi
sleep 1
done
echo "emulate did not start within 90 seconds"
cat "$RUNNER_TEMP/emulate.log"
exit 1
- name: Test
run: mise run test:emulate
env:
GOFLAGS: -race
- name: Show emulate log
if: always()
run: cat "$RUNNER_TEMP/emulate.log"