-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (57 loc) · 1.48 KB
/
integration.yml
File metadata and controls
57 lines (57 loc) · 1.48 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
name: Integration Tests
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
integration:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: initium
POSTGRES_PASSWORD: initium
POSTGRES_DB: initium_test
ports:
- 15432:5432
options: >-
--health-cmd "pg_isready -U initium"
--health-interval 2s
--health-timeout 5s
--health-retries 10
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_USER: initium
MYSQL_PASSWORD: initium
MYSQL_DATABASE: initium_test
ports:
- 13306:3306
options: >-
--health-cmd "mysqladmin ping -h localhost -u root -prootpass"
--health-interval 2s
--health-timeout 5s
--health-retries 15
http-server:
image: nginx:1-alpine
ports:
- 18080:80
options: >-
--health-cmd "wget --spider -q http://localhost:80/"
--health-interval 2s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run integration tests
env:
INTEGRATION: "1"
run: cargo test --test integration_test -- --test-threads=1