Repository navigation
91 lines (86 loc) · 2.71 KB
/
Copy pathci.yml
File metadata and controls
91 lines (86 loc) · 2.71 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
79
80
81
82
83
84
85
86
87
88
89
90
91
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
orchestrator:
name: orchestrator (python unittest)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
# orchestrator is dependency-free (stdlib only) — nothing to install.
- name: Run unit tests
run: python3 -m unittest discover -s orchestrator/tests -v
orchestrator-postgres:
name: orchestrator (postgres backend)
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: moira
POSTGRES_PASSWORD: moira
POSTGRES_DB: moira
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
# Postgres is the only path that needs a driver (lazy-imported in pg_store).
- name: Install psycopg
run: pip install "psycopg[binary]"
# MOIRA_PG_DSN un-skips the live Postgres conformance + durable-runner tests
# (lease claim under SELECT … FOR UPDATE SKIP LOCKED, rowcount semantics).
- name: Run tests against Postgres
env:
MOIRA_PG_DSN: postgresql://moira:moira@localhost:5432/moira
run: python3 -m unittest discover -s orchestrator/tests -v
cockpit:
name: cockpit (type-check + build)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: cockpit/package-lock.json
- name: Install
run: npm ci --prefix cockpit
- name: Build (tsc + vite)
run: npm run build --prefix cockpit
tauri:
name: tauri (cargo check)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
src-tauri/target
key: ${{ runner.os }}-cargo-${{ hashFiles('src-tauri/Cargo.lock') }}
# Tauri v2 on Linux needs the webkit2gtk-4.1 stack to compile the shell crate.
- name: System deps (Tauri v2 / Linux)
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev libgtk-3-dev \
libayatana-appindicator3-dev librsvg2-dev
- name: cargo check
working-directory: src-tauri
run: cargo check --locked