-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (56 loc) · 1.52 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: polytag
RUST_CHANNEL: nightly
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
POSTGRES_DB: ${{ env.POSTGRES_DB }}
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
meilisearch:
image: getmeili/meilisearch
options: >-
--health-cmd "wget -q localhost:7700/health -O /dev/null"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 7700:7700
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
run: |
rustup update --no-self-update ${{ env.RUST_CHANNEL }}
- name: Compile (tests)
run: cargo test --no-run
- name: Test
run: cargo test
env:
FILE_BASE_PATH: temp/files
TEMP_BASE_PATH: temp/temp
DATABASE_URL_BASE: postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@localhost:5432
DATABASE_NAME: ${{ env.POSTGRES_DB }}
MAINTENANCE_DATABASE_NAME: postgres
MEILISEARCH_URL: http://localhost:7700