Skip to content

Commit 7f2c88d

Browse files
committed
[MINOR][TESTS] Ignore GitHub Action and AppVeyor file changes in testing
### What changes were proposed in this pull request? This PR aims to ignore `GitHub Action` and `AppVeyor` file changes. When we touch these files, Jenkins job should not trigger a full testing. ### Why are the changes needed? Currently, these files are categorized to `root` and trigger the full testing and ends up wasting the Jenkins resources. - #26555 ``` [info] Using build tool sbt with Hadoop profile hadoop2.7 under environment amplab_jenkins From https://github.com/apache/spark * [new branch] master -> master [info] Found the following changed modules: sparkr, root [info] Setup the following environment variables for tests: ``` ### Does this PR introduce any user-facing change? No. (Jenkins testing only). ### How was this patch tested? Manually. ``` $ dev/run-tests.py -h -v ... Trying: [x.name for x in determine_modules_for_files([".github/workflows/master.yml", "appveyor.xml"])] Expecting: [] ... ``` Closes #26556 from dongjoon-hyun/SPARK-IGNORE-APPVEYOR. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]> (cherry picked from commit d0470d6) Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent b4e7e50 commit 7f2c88d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

dev/run-tests.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,20 @@ def determine_modules_for_files(filenames):
4242
"""
4343
Given a list of filenames, return the set of modules that contain those files.
4444
If a file is not associated with a more specific submodule, then this method will consider that
45-
file to belong to the 'root' module.
45+
file to belong to the 'root' module. GitHub Action and Appveyor files are ignored.
4646
4747
>>> sorted(x.name for x in determine_modules_for_files(["python/pyspark/a.py", "sql/core/foo"]))
4848
['pyspark-core', 'sql']
4949
>>> [x.name for x in determine_modules_for_files(["file_not_matched_by_any_subproject"])]
5050
['root']
51+
>>> [x.name for x in determine_modules_for_files( \
52+
[".github/workflows/master.yml", "appveyor.yml"])]
53+
[]
5154
"""
5255
changed_modules = set()
5356
for filename in filenames:
57+
if filename in (".github/workflows/master.yml", "appveyor.yml"):
58+
continue
5459
matched_at_least_one_module = False
5560
for module in modules.all_modules:
5661
if module.contains_file(filename):

0 commit comments

Comments
 (0)