...

Text file src/k8s.io/klog/v2/.github/workflows/test.yml

Documentation: k8s.io/klog/v2/.github/workflows

     1name: Test
     2on: [push, pull_request]
     3jobs:
     4  test:
     5    strategy:
     6      matrix:
     7        go-version: ["1.18", "1.19", "1.20", "1.21"]
     8        platform: [ubuntu-latest, macos-latest, windows-latest]
     9    runs-on: ${{ matrix.platform }}
    10    steps:
    11    - name: Install Go
    12      uses: actions/setup-go@v1
    13      with:
    14        go-version: ${{ matrix.go-version }}
    15    - name: Checkout code
    16      uses: actions/checkout@v2
    17    - name: Test klog
    18      run: |
    19        go get -t -v ./...
    20        go test -v -race ./...
    21    - name: Test examples
    22      run: cd examples && go test -v -race ./...
    23  apidiff:
    24    runs-on: ubuntu-latest
    25    if: github.base_ref
    26    steps:
    27      - name: Install Go
    28        uses: actions/setup-go@v1
    29        with:
    30          go-version: 1.21
    31      - name: Add GOBIN to PATH
    32        run: echo "PATH=$(go env GOPATH)/bin:$PATH" >>$GITHUB_ENV
    33      - name: Install dependencies
    34        run: GO111MODULE=off go get golang.org/x/exp/cmd/apidiff
    35      - name: Checkout old code
    36        uses: actions/checkout@v2
    37        with:
    38          ref: ${{ github.base_ref }}
    39          path: "old"
    40      - name: Checkout new code
    41        uses: actions/checkout@v2
    42        with:
    43          path: "new"
    44      - name: APIDiff
    45        run: ./hack/verify-apidiff.sh -d ../old
    46        working-directory: "new"

View as plain text