コード例 #1
0
ファイル: triggers.py プロジェクト: aaronmueller/parlai-hred
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]']
    )
コード例 #2
0
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
コード例 #3
0
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
コード例 #4
0
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
コード例 #5
0
ファイル: triggers.py プロジェクト: aaronmueller/parlai-hred
def detect_osx():
    """
    Check if we should run OSX tests.
    """
    commit_msg = '[osx]' in testing_utils.git_commit_messages().lower()
    return commit_msg