...

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

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

     1name: test
     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  test:
    16    permissions:
    17      contents: read      # for actions/checkout to fetch code
    18    timeout-minutes: 10
    19
    20    strategy:
    21      matrix:
    22        # test against the "oldest" supported version and the current version
    23        # of go. Go 1.17 is kept in this matrix as it is the minimum version
    24        # specified in go.mod, and maintaining compatibility with go 1.17 is
    25        # currently not much of a burden. Most projects using this module are
    26        # using newer versions than that, so we can drop the old version if
    27        # it becomes too much of a burden.
    28        go-version: [1.17.x, stable]
    29        os: [ubuntu-20.04, ubuntu-22.04, windows-2022]
    30    runs-on: ${{ matrix.os }}
    31    steps:
    32    - name: Install Go
    33      uses: actions/setup-go@v3
    34      with:
    35        go-version: ${{ matrix.go-version }}
    36    - name: Checkout code
    37      uses: actions/checkout@v3
    38    - name: go mod tidy
    39      run: |
    40        go mod tidy
    41        git diff --exit-code
    42    - name: Test
    43      run: |
    44        go test -exec "sudo -n" -v ./...
    45

View as plain text