sigs.k8s.io/kubebuilder/v3@v3.14.0/.github/workflows/lint-sample.yml (about) 1 # Copyright 2023 The Caramello-io Authors. 2 3 name: Sample Testdata Tests 4 5 on: 6 push: 7 pull_request: 8 9 jobs: 10 test: 11 name: "Testdata - make test" 12 runs-on: ubuntu-latest 13 if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) 14 steps: 15 - name: Clone the code 16 uses: actions/checkout@v4 17 - name: Setup Go 18 uses: actions/setup-go@v5 19 with: 20 go-version: '~1.21' 21 - name: Remove pre-installed kustomize 22 run: sudo rm -f /usr/local/bin/kustomize 23 - name: Run make test for project-v4-with-deploy-image 24 run: cd testdata/project-v4-with-deploy-image && go mod tidy && make all && make test 25 - name: Run make test for project-v4-multigroup-with-deploy-image 26 run: cd testdata/project-v4-multigroup-with-deploy-image && go mod tidy && make all && make test 27 28 lint: 29 name: "Testdata - Lint" 30 runs-on: ubuntu-latest 31 # Pull requests from the same repository won't trigger this checks as they were already triggered by the push 32 if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) 33 steps: 34 - name: Setup Go 35 uses: actions/setup-go@v5 36 with: 37 go-version: '~1.21' 38 - name: Clone the code 39 uses: actions/checkout@v4 40 - name: Run linter 41 uses: golangci/golangci-lint-action@v3 42 with: 43 version: v1.54 44 working-directory: testdata/project-v4-with-deploy-image 45 args: --config .golangci.yml ./... 46 skip-cache: true # first lint action will handle 47 - name: Run linter 48 uses: golangci/golangci-lint-action@v3 49 with: 50 version: v1.54 51 working-directory: testdata/project-v4-multigroup-with-deploy-image 52 args: --config .golangci.yml ./... 53 skip-cache: true # first lint action will handle