github.com/tooploox/oya@v0.0.21-0.20230524103240-1cda1861aad6/features/ignore.feature (about)

     1  Feature: .oyaignore
     2  
     3  Background:
     4     Given I'm in project dir
     5  
     6  Scenario: Empty .oyaignore
     7    Given file ./Oyafile containing
     8      """
     9      Project: project
    10      all: echo "main"
    11      """
    12    And file ./oya/subdir/Oyafile containing
    13      """
    14      all: echo "subdir"
    15      """
    16    When I run "oya run --recurse all"
    17    Then the command succeeds
    18    And the command outputs
    19    """
    20    main
    21    subdir
    22  
    23    """
    24  
    25  Scenario: Ignore file
    26    Given file ./Oyafile containing
    27      """
    28      Project: project
    29      Ignore:
    30        - subdir/Oyafile
    31      all: echo "main"
    32      """
    33    And file ./subdir/Oyafile containing
    34      """
    35      all: echo "subdir"
    36      """
    37    When I run "oya run --recurse all"
    38    Then the command succeeds
    39    And the command outputs
    40    """
    41    main
    42  
    43    """
    44  
    45  Scenario: Wildcard ignore
    46    Given file ./Oyafile containing
    47      """
    48      Project: project
    49      Ignore:
    50        - subdir/*
    51      all: echo "main"
    52      """
    53    And file ./subdir/Oyafile containing
    54      """
    55      all: echo "subdir"
    56      """
    57    And file ./subdir/foo/Oyafile containing
    58      """
    59      all: echo "subdir/foo"
    60      """
    61    When I run "oya run --recurse all"
    62    Then the command succeeds
    63    And the command outputs
    64    """
    65    main
    66  
    67    """