-
Notifications
You must be signed in to change notification settings - Fork 6
85 lines (80 loc) · 3.01 KB
/
tests.yml
File metadata and controls
85 lines (80 loc) · 3.01 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
name: Tests
# PR-time gate: runs Rust + plugin unit tests, Linux Docker e2e, and Windows e2e
# before merge. Tag pushes go through `release.yml` which independently runs the
# build matrix and publishes — both workflows call the SAME reusable unit-suite
# (`_unit-suite.yml`) and e2e-suite (`_e2e-suite.yml`) so PR-time and
# release-time tests never drift.
#
# IMPORTANT: any change to bridge transport, bash spawning, ONNX install,
# locking, or platform-conditional code paths SHOULD touch the matching
# integration test or e2e scenario in `_e2e-suite.yml`. The Linux harness has
# caught real regressions before; the Windows e2e is here to extend that
# coverage to issue-#26-class Windows-specific bugs (bash timeouts, lock
# recovery, path separators).
on:
pull_request:
paths:
- "crates/**"
- "packages/**"
- "tests/**"
- "scripts/**"
- "Cargo.toml"
- "Cargo.lock"
- "package.json"
- "bun.lock"
- ".github/opencode-version.txt"
- ".github/workflows/tests.yml"
- ".github/workflows/release.yml"
- ".github/workflows/_unit-suite.yml"
- ".github/workflows/_e2e-suite.yml"
- ".github/workflows/bump-opencode.yml"
push:
branches:
- main
paths:
- "crates/**"
- "packages/**"
- "tests/**"
- "scripts/**"
- "Cargo.toml"
- "Cargo.lock"
- "package.json"
- "bun.lock"
- ".github/opencode-version.txt"
- ".github/workflows/tests.yml"
- ".github/workflows/release.yml"
- ".github/workflows/_unit-suite.yml"
- ".github/workflows/_e2e-suite.yml"
- ".github/workflows/bump-opencode.yml"
workflow_dispatch:
inputs:
ref:
description: "Git ref to test (branch name, tag, or commit SHA)"
required: false
type: string
# Cancel in-flight runs for the same PR/branch when a new commit arrives.
# Saves CI minutes and surfaces the latest result faster.
concurrency:
group: tests-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# ---------------------------------------------------------------------------
# All unit-level coverage (Linux, macOS, Windows cargo, Windows bash e2e).
# Defined as a reusable workflow so release.yml shares the exact same
# workload. PR mode (strict=false): Windows jobs are non-blocking; Linux
# and macOS still block. See `_unit-suite.yml` for details.
# ---------------------------------------------------------------------------
unit:
name: Unit
uses: ./.github/workflows/_unit-suite.yml
with:
strict: false
# ---------------------------------------------------------------------------
# Linux Docker e2e + Pi RPC e2e + macOS native e2e + Windows native e2e.
# Reuses the same _e2e-suite.yml that release.yml calls. Gates on `unit`
# so e2e only runs when ALL blocking unit jobs (Linux + macOS) pass.
# ---------------------------------------------------------------------------
e2e:
name: E2E
needs: unit
uses: ./.github/workflows/_e2e-suite.yml