-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (67 loc) · 2.31 KB
/
Copy pathci.yml
File metadata and controls
78 lines (67 loc) · 2.31 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
75
76
77
78
name: CI
on:
push:
branches: [master]
pull_request:
# Reusable so release.yml gates publish on the exact same matrix —
# release-time and PR-time CI can never drift.
workflow_call:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
# Cross-platform matrix is deliberate: cortexkit-paths carries cfg(windows)
# canonicalization (verbatim \\?\ + UNC strip, drive-letter uppercasing) that
# only compiles/runs on Windows. Running the matrix on every push validates
# those Windows vectors continuously, instead of relying on a manual
# native-Windows check before each release.
test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Format check
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Test
run: cargo test --workspace --all-targets
# cortexkit-store-postgres's live tests need a real postgres. GitHub service
# containers are Linux-only, so they run here (the cross-OS matrix above skips
# them: no DSN -> skip-pass, which is correct on macOS/Windows). CORTEXKIT_REQUIRE_PG
# makes a missing DSN FAIL here instead of silently skip-passing, so a broken
# service wiring can never show a false green.
postgres:
name: Postgres backend (live)
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: ck
POSTGRES_PASSWORD: ckpw
POSTGRES_DB: ckstore
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U ck -d ckstore"
--health-interval 5s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- name: Test cortexkit-store-postgres (live)
env:
CORTEXKIT_TEST_PG_DSN: postgresql://ck:ckpw@127.0.0.1:5432/ckstore
CORTEXKIT_REQUIRE_PG: "1"
run: cargo test -p cortexkit-store-postgres -- --nocapture