-
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (43 loc) · 1.24 KB
/
ci.yaml
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
name: CI
on:
push:
branches:
- main
jobs:
test:
name: Run Tests with SurrealDB
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Start SurrealDB
uses: surrealdb/setup-surreal@v2
with:
surrealdb_version: latest
surrealdb_port: 8000
surrealdb_username: root
surrealdb_password: root
surrealdb_auth: false
surrealdb_strict: false
surrealdb_log: info
surrealdb_additional_args: --allow-all
surrealdb_retry_count: 30
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install
- name: Wait for SurrealDB
run: |
echo "Waiting for SurrealDB to become healthy..."
until curl --fail http://localhost:8000/status; do
echo "Waiting for SurrealDB..."
sleep 1
done
echo "SurrealDB is up and running!"
- name: Run tests
run: bun test
- name: Stop SurrealDB
if: always()
run: echo "Cleaning up... SurrealDB service will stop automatically."