@@ -22,12 +22,15 @@ def test_ci_workflow_path_filter_has_valid_structure_and_engine_paths():
2222 assert "uses: dorny/paths-filter@v3" in changes
2323 assert "code_graph: ${{ steps.filter.outputs.code_graph }}" in changes
2424 assert "evidence_ledger: ${{ steps.filter.outputs.evidence_ledger }}" in changes
25+ assert "notify: ${{ steps.filter.outputs.notify }}" in changes
2526 assert "code-graph:" not in changes
2627 assert "evidence-ledger:" not in changes
28+ assert "stations/notify:" not in changes
2729
2830 for path in (
2931 "engines/code-graph/**" ,
3032 "engines/evidence-ledger/**" ,
33+ "stations/notify/**" ,
3134 "src/brigade/templates/components/manifest-v1.json" ,
3235 ".github/workflows/ci.yml" ,
3336 ):
@@ -63,6 +66,23 @@ def test_ci_workflow_gates_native_engine_jobs_with_valid_expressions():
6366 assert "self-hosted" not in section
6467
6568
69+ def test_ci_workflow_gates_notify_jobs_with_valid_expressions ():
70+ text = (ROOT / ".github/workflows/ci.yml" ).read_text ()
71+ expected_jobs = {
72+ "notify-build-and-test" : "notify" ,
73+ "notify-windows" : "notify" ,
74+ }
75+
76+ job_names = re .findall (r"^ ([a-z0-9][a-z0-9-]*):$" , text , re .MULTILINE )
77+ assert {name for name in job_names if name .startswith ("notify-" )} == set (expected_jobs )
78+
79+ for job_name , output_name in expected_jobs .items ():
80+ section = _workflow_job_section (text , job_name )
81+ assert "needs: changes" in section
82+ assert f"if: ${{{{ needs.changes.outputs.{ output_name } == 'true' }}}}" in section
83+ assert "self-hosted" not in section
84+
85+
6686def test_ci_workflow_runs_embedded_engine_commands_from_engine_directories ():
6787 text = (ROOT / ".github/workflows/ci.yml" ).read_text ()
6888
@@ -106,6 +126,37 @@ def test_ci_workflow_runs_embedded_engine_commands_from_engine_directories():
106126 assert command in evidence_ledger
107127
108128
129+ def test_ci_workflow_runs_notify_go_commands_from_notify_directory ():
130+ text = (ROOT / ".github/workflows/ci.yml" ).read_text ()
131+
132+ ubuntu = _workflow_job_section (text , "notify-build-and-test" )
133+ assert "runs-on: ubuntu-latest" in ubuntu
134+ assert "working-directory: stations/notify" in ubuntu
135+ assert "uses: actions/setup-go@v5" in ubuntu
136+ assert "go-version: '1.22'" in ubuntu
137+ for command in (
138+ "go build ./..." ,
139+ "go vet ./..." ,
140+ "go test -race ./..." ,
141+ "go install golang.org/x/vuln/cmd/govulncheck@v1.3.0" ,
142+ "govulncheck ./..." ,
143+ ):
144+ assert command in ubuntu
145+
146+ windows = _workflow_job_section (text , "notify-windows" )
147+ assert "runs-on: windows-latest" in windows
148+ assert "working-directory: stations/notify" in windows
149+ assert "uses: actions/setup-go@v5" in windows
150+ assert "go-version: '1.22'" in windows
151+ for command in (
152+ "go build ./..." ,
153+ "go vet ./..." ,
154+ "go test -race ./..." ,
155+ ):
156+ assert command in windows
157+ assert "govulncheck" not in windows
158+
159+
109160def test_ci_workflow_does_not_skip_docs_only_content_guard ():
110161 text = (ROOT / ".github/workflows/ci.yml" ).read_text ()
111162
0 commit comments