k8s.io/kube-openapi@v0.0.0-20240228011516-70dd3763d340/.github/workflows/ci.yml (about)

     1  name: ci-pipeline
     2  on:
     3    push:
     4      branches: [ master ]
     5    pull_request:
     6      branches: [ master ]
     7  jobs:
     8    ci:
     9      runs-on: ubuntu-latest
    10      steps:
    11      - uses: actions/checkout@v3
    12      - name: Set up Go
    13        uses: actions/setup-go@v4
    14        with:
    15          go-version-file: 'go.mod'
    16      - name: Build
    17        run: |
    18          go mod tidy && git diff --exit-code
    19          go build ./cmd/... ./pkg/...
    20      - name: Format
    21        run: |
    22          diff=$(gofmt -s -d .)
    23          if [[ -n "${diff}" ]]; then echo "${diff}"; exit 1; fi
    24      - name: Test
    25        run: |
    26          go test -race ./cmd/... ./pkg/...
    27      - name: Run integration tests
    28        run: |
    29          cd test/integration
    30          go mod tidy && git diff --exit-code
    31          go test ./...
    32    required:
    33      # The name of the ci jobs above change based on the golang version.
    34      # Use this as a stable required job that depends on the above jobs.
    35      # ref: https://github.com/kubernetes/test-infra/pull/27016
    36      needs: ci
    37      runs-on: ubuntu-latest
    38      steps:
    39      - run: echo "Required jobs success!"