File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ jobs:
153153 name : " Total Success"
154154 if : always()
155155 needs :
156+ - path-filter
156157 - validate
157158 - storage-test
158159 - storage-cross
Original file line number Diff line number Diff line change 99 LINT_VERSION : v2.12.2
1010
1111jobs :
12- codespell :
12+ basic :
1313 runs-on : ubuntu-24.04
1414 steps :
1515 - uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
1818 run : pip install --break-system-packages codespell==v2.4.1
1919 - name : run codespell
2020 run : make codespell
21+ - name : check-ci-yaml
22+ run : make check-ci-yaml
2123
2224 lint :
2325 runs-on : ubuntu-24.04
Original file line number Diff line number Diff line change @@ -11,7 +11,11 @@ export PATH := $(PATH):${GOBIN}
1111EPOCH_TEST_COMMIT ?= $(shell git merge-base $${DEST_BRANCH:-main} HEAD)
1212
1313
14- validate : codespell git-validation lint
14+ validate : codespell git-validation lint check-ci-yaml
15+
16+ .PHONY : check-ci-yaml
17+ check-ci-yaml :
18+ hack/ci/ci_yaml_test.py
1519
1620.PHONY : codespell
1721codespell :
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+
3+ """
4+ Verify contents of .github/workflows/ci.yml meet specific expectations
5+ """
6+
7+ import sys
8+ import os
9+ import unittest
10+ import yaml
11+
12+ # Assumes directory structure of this file relative to repo.
13+ SCRIPT_DIRPATH = os .path .dirname (os .path .realpath (__file__ ))
14+ REPO_ROOT = os .path .realpath (os .path .join (SCRIPT_DIRPATH , '../' , '../' ))
15+
16+
17+ class TestCaseBase (unittest .TestCase ):
18+
19+ CI_YAML = None
20+
21+ def setUp (self ):
22+ with open (os .path .join (REPO_ROOT , '.github/workflows/ci.yml' )) as ci_yaml :
23+ self .CI_YAML = yaml .safe_load (ci_yaml .read ())
24+
25+
26+ class TestDependsOn (TestCaseBase ):
27+
28+ ALL_TASK_NAMES = None
29+
30+ def setUp (self ):
31+ super ().setUp ()
32+ self .ALL_TASK_NAMES = list (self .CI_YAML ['jobs' ].keys ())
33+
34+
35+ def test_success_deps (self ):
36+ """Specific success task depends on all others"""
37+ all_tasks = self .ALL_TASK_NAMES .remove ('success' )
38+ needs = self .CI_YAML ['jobs' ]['success' ]['needs' ]
39+ self .assertCountEqual (needs , self .ALL_TASK_NAMES )
40+
41+ if __name__ == "__main__" :
42+ unittest .main ()
You can’t perform that action at this time.
0 commit comments