sigs.k8s.io/kubebuilder/v3@v3.14.0/.github/workflows/unit-tests-legacy.yml (about)

     1  # todo: remove this file when go/v2 be removed
     2  name: Unit tests Legacy (go/v2)
     3  
     4  # Trigger the workflow on pull requests and direct pushes to any branch
     5  on:
     6    push:
     7    pull_request:
     8  
     9  jobs:
    10    test:
    11      name: ${{ matrix.os }}
    12      runs-on: ${{ matrix.os }}
    13      strategy:
    14        matrix:
    15          os:
    16            - ubuntu-latest
    17            - macos-latest
    18      # Pull requests from the same repository won't trigger this checks as they were already triggered by the push
    19      if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository)
    20      steps:
    21        - name: Clone the code
    22          uses: actions/checkout@v4
    23        - name: Setup Go
    24          uses: actions/setup-go@v5
    25          with:
    26            go-version: "1.19"
    27        # This step is needed as the following one tries to remove
    28        # kustomize for each test but has no permission to do so
    29        - name: Remove pre-installed kustomize
    30          run: sudo rm -f /usr/local/bin/kustomize
    31        - name: Perform the test
    32          run: make test-legacy