...

Text file src/github.com/vishvananda/netns/.github/workflows/validate.yml

Documentation: github.com/vishvananda/netns/.github/workflows

     1name: validate
     2on:
     3  push:
     4    tags:
     5      - v*
     6    branches:
     7      - master
     8      - main
     9  pull_request:
    10    branches:
    11      - master
    12      - main
    13
    14jobs:
    15  linters:
    16    permissions:
    17      contents: read      # for actions/checkout to fetch code
    18      pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
    19    timeout-minutes: 10
    20
    21    strategy:
    22      matrix:
    23        # We only run on the latest version of go, as some linters may be
    24        # version-dependent (for example gofmt can change between releases).
    25        go-version: [stable]
    26        os: [ubuntu-22.04, windows-2022]
    27    runs-on: ${{ matrix.os }}
    28    steps:
    29      - name: Install Go
    30        uses: actions/setup-go@v3
    31        with:
    32          go-version: ${{ matrix.go-version }}
    33      - name: Checkout code
    34        uses: actions/checkout@v3
    35      - name: Lint
    36        uses: golangci/golangci-lint-action@v3
    37        with:
    38          version: latest
    39          skip-cache: true
    40          args: --print-resources-usage --verbose
    41
    42          # Optional: show only new issues if it's a pull request. The default value is `false`.
    43          # only-new-issues: true
    44
    45          # Optional: if set to true then the action don't cache or restore ~/go/pkg.
    46          # skip-pkg-cache: true
    47
    48          # Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
    49          # skip-build-cache: true

View as plain text