Repository navigation
74 lines (62 loc) · 1.52 KB
/
Copy pathtest.yml
File metadata and controls
74 lines (62 loc) · 1.52 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
name: Test the Data
on:
push:
branches:
- master
pull_request:
branches:
- "**"
env:
CI: true
permissions: {}
jobs:
test:
runs-on: ${{ matrix.os }}
permissions: {}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Setup BunJS
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
- name: Install deps
run: |
bun install -g @usebruno/cli
bun install --frozen-lockfile
cd server
bun install --frozen-lockfile
bun run compile
- name: Validate the data & the server
env:
NODE_OPTIONS: --max-old-space-size=4096
run: |
bun run validate
cd server
bun run --bun validate
- name: Validate some requests
shell: bash
env:
NODE_OPTIONS: --max-old-space-size=4096
run: |
set -euo pipefail
cd server
bun run start &
SERVER_PID=$!
cd ..
ATTEMPTS=0
until curl -sSf http://127.0.0.1:3000/status > /dev/null; do
ATTEMPTS=$((ATTEMPTS + 1))
if [ $ATTEMPTS -ge 60 ]; then
echo "Server did not become ready within 60 seconds" >&2
kill $SERVER_PID
exit 1
fi
sleep 1
done
cd .bruno
bru run --env Developpement
kill $SERVER_PID