Test that CI is skipped if only certain files are edited
(tmpdir_factory, files, should_skip)
| 760 | yaml_and_readme=dict(files=[".asf.yaml", "docs/README.md"], should_skip=True), |
| 761 | ) |
| 762 | def test_skip_globs(tmpdir_factory, files, should_skip): |
| 763 | """ |
| 764 | Test that CI is skipped if only certain files are edited |
| 765 | """ |
| 766 | script = JENKINS_SCRIPT_ROOT / "git_skip_ci_globs.py" |
| 767 | |
| 768 | git = TempGit(tmpdir_factory.mktemp("tmp_git_dir")) |
| 769 | |
| 770 | proc = run_script( |
| 771 | [ |
| 772 | script, |
| 773 | "--files", |
| 774 | ",".join(files), |
| 775 | ], |
| 776 | check=False, |
| 777 | cwd=git.cwd, |
| 778 | ) |
| 779 | |
| 780 | if should_skip: |
| 781 | assert proc.returncode == 0 |
| 782 | else: |
| 783 | assert proc.returncode == 1 |
| 784 | |
| 785 | |
| 786 | def all_time_keys(time): |
nothing calls this directly
no test coverage detected
searching dependent graphs…