github.com/kubeshop/testkube@v1.17.23/.github/workflows/lint.yaml (about) 1 name: "Linting" 2 3 on: 4 pull_request: 5 types: 6 - opened 7 - edited 8 - synchronize 9 10 permissions: 11 contents: read 12 pull-requests: read 13 14 jobs: 15 lint-openapi: 16 name: Lint OpenAPI 17 runs-on: ubuntu-latest 18 steps: 19 - name: Checkout 20 uses: actions/checkout@v3 21 22 - name: OpenAPI Lint Checks 23 uses: char0n/swagger-editor-validate@v1 24 with: 25 definition-file: api/v1/testkube.yaml 26 27 lint-go: 28 name: Lint Go 29 runs-on: ubuntu-latest 30 steps: 31 - name: Checkout 32 uses: actions/checkout@v3 33 34 - name: Set up Go 35 uses: actions/setup-go@v2 36 with: 37 go-version: 1.21 38 39 - name: Go Cache 40 uses: actions/cache@v2 41 with: 42 path: | 43 ~/go/pkg/mod 44 ~/.cache/go-build 45 key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} 46 restore-keys: | 47 ${{ runner.os }}-go- 48 49 - name: Lint using golangci-lint 50 uses: golangci/golangci-lint-action@v4 51 with: 52 version: latest 53 args: --timeout=5m 54 only-new-issues: true