def detect_all(): """ Check if we should run all tests. """ return any( kw in testing_utils.git_commit_messages().lower() for kw in ['[all]', '[long]'] )
def detect_data(): """Check if we should run data tests.""" commit_msg = '[data]' in testing_utils.git_commit_messages().lower() test_changed = any( testing_utils.is_new_task_filename(fn) for fn in testing_utils.git_changed_files()) return commit_msg or test_changed
def detect_gpu(): """ Check if we should run GPU tests. """ commit_msg = '[gpu]' in testing_utils.git_commit_messages().lower() test_changed = any('tests/nightly/gpu' in fn for fn in testing_utils.git_changed_files()) return commit_msg or test_changed
def detect_mturk(): """ Check if we should run mturk tests. """ commit_msg = '[mturk]' in testing_utils.git_commit_messages().lower() mturk_changed = any('parlai/mturk' in fn for fn in testing_utils.git_changed_files()) return commit_msg or mturk_changed
def detect_osx(): """ Check if we should run OSX tests. """ commit_msg = '[osx]' in testing_utils.git_commit_messages().lower() return commit_msg