OXYGENHUB
◆ v0.13.0 oxygenhub-vscode / .flow / pipeline.kdl
1.4 KiB · last changed Pin the build image e52c41a1: its vendored crates are readable by every runner's user, so the check job runs on plex too (refs #6) 8 days ago source blame history raw
1
// oxygenhub-vscode's pipeline (OxygenFlow, docs in the oxygenflow repository):
2
// typecheck, bundle, tests and packaging, offline in a Firecracker microVM on
3
// Earth for every push. The hub client tests need a hub binary and skip here.
4
schema-version 1
5
6
// The OxygenFlow build image (oxygenflow/images/rust), with an npm cache of
7
// this repository's package-lock.json. Rebuild and re-pin it when that changes.
8
sandbox "node" {
9
    runtime "microvm"
10
    rootfs "cas://blob/e52c41a173956b6bacc270eb81208a1b118b652412b84d15fa24708e6f8ec392"
11
    memory-limit "2GiB"
12
    cpu-limit 2
13
    network "loopback"
14
}
15
16
job "check" {
17
    sandbox "node"
18
    exec "sh" "-euc" "npm ci --offline --cache /opt/npm-cache --no-audit --no-fund && npm run typecheck && npm run build && npm run test:ci"
19
    // A JUnit report (kept whether or not the tests pass) and line coverage
20
    // of src/ through esbuild's source maps, for the hub's Tests and
21
    // Coverage tabs.
22
    output {
23
        artifact "junit" {
24
            path "/src/out/junit.xml"
25
            when "always"
26
        }
27
        artifact "coverage" {
28
            path "/src/out/lcov.info"
29
        }
30
    }
31
}
32
33
job "package" {
34
    sandbox "node"
35
    depends-on "check"
36
    // A fresh workspace: nothing from check carries over, so build first.
37
    exec "sh" "-euc" "npm ci --offline --cache /opt/npm-cache --no-audit --no-fund && npm run build && npm run package"
38
}