-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (39 loc) · 1020 Bytes
/
rust.yml
File metadata and controls
47 lines (39 loc) · 1020 Bytes
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
name: Rust
on:
push:
branches: ["master"]
env:
CARGO_TERM_COLOR: always
DATABASE_URL: postgres://postgres:password@localhost:5432/OneLLM
POSTGRES: postgres://postgres:password@localhost:5432/OneLLM
CI: true
RUST_BACKTRACE: 1
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: password
POSTGRES_DB: OneLLM
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Wait for PostgreSQL
run: |
for i in {1..10}; do
pg_isready -h postgres -p 5432 && break
echo "Waiting for PostgreSQL..."
sleep 3
done
- name: Run tests from testing.rs
run: cargo test --bin oneAI-backend
- name: Cargo check
run: cargo check --bin oneAI-backend